Date: Thu, 26 May 2005 11:17:12 +0800 From: "li xu" <lixu_cn@hotmail.com> To: aic7xxx@freebsd.org Subject: Why I can't set up target mode? Message-ID: <BAY9-F2251B59E2DA74E719594A6950F0@phx.gbl>
next in thread | raw e-mail | index | archive | help
Hi, I have found your message on [1]http://lists.freebsd.org/pipermail/aic7xxx/2003-October/004010.html you said that: I am trying to set up target mode on my FreeBSD 5.1 box. On my FreeBSD box, I have a 2940 card (with aic7880 chip), SCSI id=6, a ST2.1s hard drive. SCSI id=1 (though the HD is not mounted to any file system, all the file systems are on one IDE drive.) On another PC (lets call it machineB), I have a 2940 card (7870 chip), SCSI ID 7, no other devices. I connect the two SCSI cards with an external SCSI cable. In the FreeBSD box, I have rebuilt the kernel, in the conf file, I have the "device ahc" line commented out (so that I can kldload and debug the ahc.ko/ahc_pci.ko), I also add "device targ", "device targbh", and "options AHC_TMODE_ENABLE=0x40" lines in the conf file. In the aic7xxx.* files, I have #define AHC_TARGET_MODE 1 After the new kernel is built, I boot the FreeBSD box first, log in as root, and kldload the ahc_pci.ko. I got the following messages: ahc0: <Adaptec 2940 Ultra SCSI adapter> port 0x1400-0x14ff mem 0xf480400-0xf4804ff irq 9 at device 15.0 on pci0 aic7880: Single Channel A, SCSI Id=6, 16/253 SCBs (targetbh0:ahc0:0:-1:-1): Lun now enabled for target mode ...... My hardware is just the same to you and my operation system is FreeBSD 5.3. I do all these works according to your directions,but I can only get this system messge: ahc0: <Adaptec 2940 Ultra SCSI adapter> port 0x9c00-0x9cff mem 0xe3021000-0xe3021fff irq 17 at device 1.0 on pci2 ahc0: [GIANT-LOCKED] aic7880: Ultra Wide Channel A, SCSI Id=7, 16/253 SCBs In any case,I can not get the last message, (targetbh0:ahc0:0:-1:-1): Lun now enabled for target mode Afterward, I add some debug code in source file aic7xxx_osm.c and rebuild them: printf("ccb->ccb_h.func_code is %d\n",ccb->ccb_h.func_code); in function ahc_action(struct cam_sim *sim, union ccb *ccb) before the code switch (ccb->ccb_h.func_code) { So I get this debug message: ccb->ccb_h.func_code is 4 (4 means the status is XPT_PATH_INQ, not the expectation value XPT_EN_LUN) Can you help me to analysis why I can’t get the correct message like yours? Maybe which step I have omitted or some key step you hadn’t mentioned in the above messages? I expect you can give me a direction or suggestion, or send your new configuration file: /usr/src/sys/i386/GENERIC file to me is useful. Thanks a lot. _________________________________________________________________ 使用 [2]MSN Messenger 与联机的朋友进行交流 References 1. http://lists.freebsd.org/pipermail/aic7xxx/2003-October/004010.html 2. http://g.msn.com/8HMACNCN/2731??PS=47575
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BAY9-F2251B59E2DA74E719594A6950F0>