免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1704 | 回复: 0
打印 上一主题 下一主题

solaris device driver 3(scsi) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-05-28 19:31 |只看该作者 |倒序浏览

scsi driver testing.

The scsi driver sample sst compiled successfully. but when loaded there were some errors,

May 26 17:38:21 jackv genunix: [ID 935449 kern.info]    ATA DMA off: disabled.  Control with "atapi-cd-dma-enabled" property
May 26 17:38:21 jackv genunix: [ID 882269 kern.info]    PIO mode 4 selected
May 26 17:38:21 jackv genunix: [ID 935449 kern.info]    ATA DMA off: disabled.  Control with "atapi-cd-dma-enabled" property
May 26 17:38:21 jackv genunix: [ID 882269 kern.info]    PIO mode 4 selected
May 26 17:38:21 jackv genunix: [ID 819705 kern.notice] /usr/kernel/drv/sst: undefined symbol
May 26 17:38:21 jackv genunix: [ID 826211 kern.notice]  'scsi_setup_cdb'
May 26 17:38:21 jackv genunix: [ID 819705 kern.notice] /usr/kernel/drv/sst: undefined symbol
May 26 17:38:21 jackv genunix: [ID 826211 kern.notice]  'scsi_alloc_consistent_buf'
May 26 17:38:21 jackv genunix: [ID 819705 kern.notice] /usr/kernel/drv/sst: undefined symbol
May 26 17:38:21 jackv genunix: [ID 826211 kern.notice]  'scsi_ifsetcap'
May 26 17:38:21 jackv genunix: [ID 819705 kern.notice] /usr/kernel/drv/sst: undefined symbol
May 26 17:38:21 jackv genunix: [ID 826211 kern.notice]  'scsi_errmsg'
May 26 17:38:21 jackv genunix: [ID 819705 kern.notice] /usr/kernel/drv/sst: undefined symbol
May 26 17:38:21 jackv genunix: [ID 826211 kern.notice]  'scsi_destroy_pkt'

search on google and got the solution, the line below added to the source then the problem solved.
    char _depends_on[] = "misc/scsi";

======================================================Then new problem happened. scsi_probe reported no response error.

May 26 18:10:53 jackv usba: [ID 691482 kern.warning] WARNING: /pci@0,0/pci15ad,1976@7,2 (uhci0): No SOF interrupts have been received, this USB UHCI host controller is unusable
May 26 18:10:53 jackv sst: [ID 902828 kern.notice] sst0:        No response from target 5, lun 0

This is because no target 5 scsi, changed the number to 3(I have such a device), then it worked.

======================================================
debug logs displayed on console not in the message file. edit the syslogd.conf file, and restart syslog as below,

svcadm restart svc:/system/system-log:default
or svcadm restart /system/system-log

but config syslog did not solved the problem. checked the code, the line below caused the problem.
     cmn_err(CE_CONT, "^%s:\t%s", name, buf);
get rid of '^' and it worked.
======================================================
now the driver could do some work. use target=3 in the driver, and use a script to create links to the device file.

-bash-3.00# mkfs /dev/rdsk/c2t2d0s2 8192
Warning: the requested size of this file system
(8192 sectors) is greater than the size of the
device reported by the driver (0 sectors).
However, a read of the device at the requested size
does succeed, so the requested size will be used.
/dev/rdsk/c2t2d0s2:     8192 sectors in 16 cylinders of 16 tracks, 32 sectors
        4.0MB in 1 cyl groups (16 c/g, 4.00MB/g, 1920 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32,

Only slice 2 worked(size is not corect). others report "/dev/rdsk/c2t2d0s3: No such device or address".  anyway, the driver worked. and the driver sd for target 3 was 'automatically' replaced by the new driver.










本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/38597/showart_312001.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP