BUG REPORT: terminal hangs when I load the sd_mod module
I have a 2.6.0-test8 kernel with the jumpshot card reader. I can compile the generic scsi driver no problem, and when I insert the flash card I get the following log entry:
Oct 20 23:23:02 doug kernel: hub 2-1:1.0: new USB device on port 2, assigned address 4 Oct 20 23:23:02 doug kernel: scsi1 : SCSI emulation for USB Mass Storage devices Oct 20 23:23:02 doug kernel: Vendor: Lexar Model: Jumpshot USB CF Rev: 0001 Oct 20 23:23:02 doug kernel: Type: Direct-Access ANSI SCSI revision: 02
When I try and load the sd_mod module, that terminal just simply freezes and I can't break out. Similarly, if I compile scsi disk support right into the kernel, it sits forever at boot time. I have the following options set in my .config.
#
# SCSI device support
#CONFIG_SCSI=yCONFIG_SCSI_PROC_FS=y
#
# SCSI support type (disk, tape, CD-ROM)
#CONFIG_BLK_DEV_SD=m
# CONFIG_CHR_DEV_ST is not set
# CONFIG_CHR_DEV_OSST is not set
# CONFIG_BLK_DEV_SR is not setCONFIG_CHR_DEV_SG=y
#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs #
# CONFIG_SCSI_MULTI_LUN is not set
# CONFIG_SCSI_REPORT_LUNS is not set CONFIG_SCSI_CONSTANTS=yCONFIG_SCSI_LOGGING=y
This problem has been present since at least -test6. Any ideas what's going on?
Thanks,
Chris
Quoted 7 lines · Chris Friesen
When I try and load the
sd_modmodule, that terminal just simply freezes and I can't break out. Similarly, if I compile scsi disk support right into the kernel, it sits forever at boot time. I have the following options set in my .config.This problem has been present since at least -test6. Any ideas what's going on?
Maybe the MODE SENSE page cache is causing problems (known problem with some USB storage devices), triggering the error (i.e. timeout) handler to run, leading to the command being retried forever.
Turn on all scsi logging (you must be logging and booting over IDE, so the following won't cause infinite logging):
sysctl -w dev.scsi.logging_level=0xffffffff
Also get a trace of the hung process via sysrq.
After you get that data, try removing sd_do_mode_sense() calls in sd.c to see if MODE SENSE commands are causing problems.
You could also try using sg (sg_utils) to send a MODE SENSE page 8, and see what happens.
-- Patrick Mansfield