Date: Thu, 31 May 2001 17:18:38 +0200 (MEST) From: Markus Meyer <msmeyer@gmx.net> To: freebsd-scsi@freebsd.org Cc: msmeyer@gmx.net Subject: again: mly driver and enclosure devices Message-ID: <14593.991322318@www24.gmx.net>
next in thread | raw e-mail | index | archive | help
Hi, as described by Clemens (haribeau@gmx.de) and others some mails before there's a problem when using the backplane ESG-SHV SCA HSBP M14 (enclosure device) together with the mly driver. It's not really clear what happens, but it seems like the mly driver communicates with the backplane in a wrong way, which causes the backplane to go to offline mode. In offline mode, automatic rebuild and other functions will not work. This is represented by error messages on bootup. I am really no SCSI expert, but some days ago I wrote a short patch that prevents the backplane from communicating with the driver. Each IO message is tested against a hardcoded target and lun number and if it matches, the message will not be processed any further. That solved the problem (at least at first glance), but simply ignoring the messages seemed like a bad hack to me, and hardcoding the target and lun numbers in the code is also not nice. In the meantime, Mike and others supplied some suggestions and patches, but we tested these and they did not work. Mike had the idea of returning a timeout state within the device inquiry, to stop the enclosure from doing any further requests. But this does not work, because the inquiry seems to be for the logical devices, and the backplane does not do any inquiry at all. Another problem is, that I cannot find a way to detect, which device is the enclosure. I added a lot of debug messages and dumped the mb_type and mb_name fields, and other fields that could give a hint, which one is the enclosure device, but without any result. We finally decided to use the patch below. If anyknow knows how to automatically detect the enclosure device, or if simply ignoring all message from the device is harmful, please let me know. I am not a member of the list, so please reply with my email adress in the CC field. Markus msmeyer@gmx.net ------- The patch -------- *** orig/mly_cam.c Thu May 31 17:01:14 2001 --- mly_cam.c Thu May 31 18:30:49 2001 *************** *** 243,248 **** --- 243,263 ---- bus = cam_sim_bus(sim); target = csio->ccb_h.target_id; + #define MLY_ESGSHV + #define MLY_ESGSHV_TARGET 6 + #define MLY_ESGSHV_LUN 0 + + #ifdef MLY_ESGSHV + /* If this is the ID of the backplane, ignore command */ + if (csio->ccb_h.target_id == MLY_ESGSHV_TARGET && + ccb->ccb_h.target_lun == MLY_ESGSHV_LUN) + { + csio->ccb_h.status = CAM_REQ_INVALID; + ccb->ccb_h.status = CAM_REQ_INVALID; + break; + } + #endif + debug(2, "XPT_SCSI_IO %d:%d:%d", bus, target, ccb->ccb_h.target_lun); /* check for I/O attempt to a protected device */ -- Machen Sie Ihr Hobby zu Geld bei unserem Partner 1&1! http://profiseller.de/info/index.php3?ac=OM.PS.PS003K00596T0409a -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14593.991322318>