* Aaron Stellman <[email protected]> [2010-06-07 08:42:22 -0700]:
Hi, MyBad, I meant to mention yes I am using hotplugd.
>On Mon, Jun 07, 2010 at 08:43:02AM -0400, Lego Maniac wrote:
>> * Aaron Stellman <[email protected]> [2010-05-20 13:25:01 -0600]:
>> Hi, Unfortunately i do not have the m250, i do have a m240, i cant recall
>> ever having any problems, However I have tons of spare PC hw laying around
>> if any developer wishes to probe further, if one wishes me to test on
>> other chipsets, I do have a serverworks chipset server *groan* HE-SL tyan
>> varient, i forget the mobo model offhand. and a tbird with with the K7Pro
>> mobo 6195 IIRC, though I did have interesting scsi problems on/off for the
>> past 4 months of following -current but it seems to have gotten better the
>> past month or so somewhere. curious if you're still having the problem or
>> the problem has been fixed.. IIRC the only real diff between the sandisk
>> m240/m250 is mine is the 1gb model and you may have the 2gb model.
>> though I have not really checked up on the m250 TBH.
>
>The problem hasn't been fixed, and I'm not so sure if it relates only to
>SanDisk Sansa mp3 players. You dont specify whether you are using
>hotplugd(8) and using hotplugd is the only way I can consistently
>reproduce the problem.
>In any case, I have come up with a workaround if you can call it that
>way. Basically, I use a semaphore to protect the whole attach script, so
>that only one instance of attach script may run at particular time.
Yes I cannot reproduce with your script or with the script i use; though.
However I do recall before in openbsd if your model has the 'usb features
setting' for 'automatic or MSC, perhaps try changing from auto to MSC or
vice versa whatever your setting may be, autodetect on mine never worked
very well not just on OpenBSD, Issues arises in W2K3/XP as well.
Here's the attach/detach script i use.
#!/bin/sh
DEVCLASS=$1
DEVNAME=$2
MOUNTDIR=/mnt
XUSER=`ps -axwwo user,command|grep Xsession|grep -v grep|tail -n1|cut -f1 -d" "`
function mountdisk
{
I=0
for l in `disklabel ${DEVNAME}|sed -e "s/^ *//"|cut -f1 -d" "`; do
if [ ${I} -ne 2 ]; then
# ignore the two first lines of disklabel
if [ "$l" = "#" ]; then
I=${I}+1
fi
else
PART=`echo $l|sed -e "s/://"`
if [ ${PART} != "c" ]; then
DIR=${MOUNTDIR}/${DEVNAME}${PART}
if [ ! -d "${DIR}" ]; then
mkdir -p ${DIR}
elif [ -n "`mount|grep ${DIR}`" ]; then
umount ${DIR}
fi
if [ -n "${XUSER}" ]; then
chown ${XUSER} ${DIR}
chmod 700 ${DIR}
else
chown root ${DIR}
chmod 755 ${DIR}
fi
mount -o nodev,nosuid /dev/${DEVNAME}${PART}
${DIR}
if [ $? -ne 0 ]; then
rmdir ${DIR}
fi
fi
fi
done
}
case $DEVCLASS in
2)
# disk devices
mountdisk $DEVNAME
;;
esac
#detach
#!/bin/sh
DEVCLASS=$1
DEVNAME=$2
case $DEVCLASS in
2)
# disk devices
rmdir /mnt/${DEVNAME}*
;;
esac
Some snippits.
Jun 7 13:02:09 hallucinogen hotplugd[3418]: started
umass0 at uhub0 port 4 configuration 1 interface 0 "SanDisk APIC SanDisk
Sansa m240" rev 2.00/2.25 addr 2 umass0: using SCSI over Bulk-Only
scsibus2 at umass0: 2 targets, initiator 0
sd0 at scsibus2 targ 1 lun 0: <SanDisk, Sansa m240, 1.30> SCSI0 0/direct
removable
sd0: 974MB, 512 bytes/sec, 1995840 sec total
Jun 7 13:03:03 hallucinogen hotplugd[3418]: sd0 attached, class 2
Jun 7 13:03:03 hallucinogen hotplugd[3418]: scsibus2 attached, class 0
Jun 7 13:03:03 hallucinogen hotplugd[3418]: umass0 attached, class 0
/dev/sd0i on /mnt/sd0i type msdos (local, nodev, nosuid)
sd0 detached
scsibus2 detached
Jun 7 13:05:23 hallucinogen hotplugd[3418]: sd0 detached, class 2
umass0 detached
Jun 7 13:05:23 hallucinogen hotplugd[3418]: scsibus2 detached, class 0
Jun 7 13:05:23 hallucinogen hotplugd[3418]: umass0 detached, class 0
Doubt this may be of any use the only sysctl knobs i have adjusted are
net.inet.tcp.ecn=1 # 1=Enable the TCP ECN extension
ddb.console=1 # 1=Permit entry of ddb from the console
kern.usercrypto=0 # 0=Disable userland use of /dev/crypto
kern.splassert=2 # 2=Enable with verbose error messages
kern.emul.linux=1 # enable running Linux binaries
kern.bufcachepercent=80
Apologies for the noise, Feel free to contact me off list if there's
anything else I can help with, Unfortunately I do not have te m250 model.
I will read up on the diff between yours and mine, sometime this afternoon,
evening when time permits.
Note: the attach/detach hotplug was not written by me.
Cheers
//zak
--
"Only two things are infinite, the universe and human
stupidity, and I'm not sure about the former."
- Albert Einstein