Date: Mon, 9 Feb 2004 13:39:27 -0500 (EST) From: John Engelhart <johne@zang.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/62597: asr /dev/rdpti# patch Message-ID: <20040209183927.B5C423914A4@new.zang.com> Resent-Message-ID: <200402091840.i19IeI4e080331@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 62597 >Category: kern >Synopsis: asr /dev/rdpti# patch >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Mon Feb 09 10:40:18 PST 2004 >Closed-Date: >Last-Modified: >Originator: John Engelhart >Release: FreeBSD 5.2-RELEASE-p2 i386 >Organization: >Environment: System: FreeBSD new.zang.com 5.2-RELEASE-p2 FreeBSD 5.2-RELEASE-p2 #1: Mon Feb 9 10:51:29 EST 2004 johne@new.zang.com:/usr/src/sys/i386/compile/new i386 >Description: The utilities for the Adaptec RAID cards that use the asr driver (ie, Adaptect 2100s, 3210S, 3410S, etc) open the device /dev/rdpti# to communicate with the HBA. The asr device driver creates a device /dev/rasr#. The utilities, such as raidtuil, fork a 'dpteng' process to do all the communications. In FreeBSD's prior to 5, dpteng would call mknod("/dev/rdpti#",154,0); if the rdpti device wasn't there. These mknod() calls are failing in FreeBSD 5 w/ "No such file or directory" error code. Not sure what changed in the devfs symantics, but I'm of the opinion that dpteng shouldn't be calling mknod like this anyways. One way to fix this is to create a symlink, ln -s /dev/rasr0 /dev/rdpti0. This patch creates that symlink automagically from within the asr driver. It uses make_dev_alias() to do so. Therefore the Adaptec supplied RAID utils will continue to work without having to manually ln -s the rdpti device. Prior to patch: [root@new] /dev# /usr/local/dpt/raidutil -L all Engine connect failed: COMPATILITY number osdIOrequest : File /dev/rdptr17 Could Not Be Opened [disregard the device it says it can't open, it actually walks 0-17 and has a few names for it: dpti, rdpti, rdptir, etc..] >How-To-Repeat: >Fix: --- asr.c~ Fri Sep 26 11:56:42 2003 +++ asr.c Mon Feb 9 10:48:54 2004 @@ -2782,6 +2782,7 @@ { Asr_softc_t * sc; struct scsi_inquiry_data * iq; + dev_t dev; ATTACH_SET(); if ((sc = malloc(sizeof(*sc), M_DEVBUF, M_NOWAIT | M_ZERO)) == @@ -3127,8 +3128,11 @@ /* * Generate the device node information */ - (void)make_dev(&asr_cdevsw, unit, UID_ROOT, GID_OPERATOR, 0640, + dev = make_dev(&asr_cdevsw, unit, UID_ROOT, GID_OPERATOR, 0640, "rasr%d", unit); + if(dev) { + (void)make_dev_alias(dev,"rdpti%d",unit); + } ATTACH_RETURN(0); } /* asr_attach */ >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040209183927.B5C423914A4>