From owner-svn-src-all@freebsd.org Fri Jun 26 12:00:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4BBE98D8AA; Fri, 26 Jun 2015 12:00:52 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C62710D6; Fri, 26 Jun 2015 12:00:52 +0000 (UTC) (envelope-from kadesai@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5QC0qel091683; Fri, 26 Jun 2015 12:00:52 GMT (envelope-from kadesai@FreeBSD.org) Received: (from kadesai@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5QC0q2T091680; Fri, 26 Jun 2015 12:00:52 GMT (envelope-from kadesai@FreeBSD.org) Message-Id: <201506261200.t5QC0q2T091680@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kadesai set sender to kadesai@FreeBSD.org using -f From: Kashyap D Desai Date: Fri, 26 Jun 2015 12:00:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284873 - head/sys/dev/mrsas X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2015 12:00:52 -0000 Author: kadesai Date: Fri Jun 26 12:00:51 2015 New Revision: 284873 URL: https://svnweb.freebsd.org/changeset/base/284873 Log: Counter part of mfi driver commit in mrsas Switch from make_dev_alias to make_dev_alias_p since make_dev_alias_p can gracefully fail if the /dev/megaraid_sas_ioctl_node symlink already exists. This can happen if mfi(4) and mrsas(4) are both attached to cards and providing Linux emulation support. Let the first one win. An equivalent change has been done in mfi(4). Extra credit would be to pass the Linux emulation call to the other driver when appropriate. This will probably be a rare case and the user can manually change where the symlink points to. MFC after: 3 days Modified: head/sys/dev/mrsas/mrsas.c head/sys/dev/mrsas/mrsas.h Modified: head/sys/dev/mrsas/mrsas.c ============================================================================== --- head/sys/dev/mrsas/mrsas.c Fri Jun 26 11:58:42 2015 (r284872) +++ head/sys/dev/mrsas/mrsas.c Fri Jun 26 12:00:51 2015 (r284873) @@ -811,6 +811,7 @@ mrsas_attach(device_t dev) { struct mrsas_softc *sc = device_get_softc(dev); uint32_t cmd, bar, error; + struct cdev *linux_dev; /* Look up our softc and initialize its fields. */ sc->mrsas_dev = dev; @@ -870,7 +871,8 @@ mrsas_attach(device_t dev) GID_OPERATOR, (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP), "mrsas%u", device_get_unit(dev)); if (device_get_unit(dev) == 0) - make_dev_alias(sc->mrsas_cdev, "megaraid_sas_ioctl_node"); + make_dev_alias_p(MAKEDEV_CHECKNAME, &linux_dev, sc->mrsas_cdev, + "megaraid_sas_ioctl_node"); if (sc->mrsas_cdev) sc->mrsas_cdev->si_drv1 = sc; Modified: head/sys/dev/mrsas/mrsas.h ============================================================================== --- head/sys/dev/mrsas/mrsas.h Fri Jun 26 11:58:42 2015 (r284872) +++ head/sys/dev/mrsas/mrsas.h Fri Jun 26 12:00:51 2015 (r284873) @@ -102,7 +102,7 @@ __FBSDID("$FreeBSD$"); */ #define BYTE_ALIGNMENT 1 #define MRSAS_MAX_NAME_LENGTH 32 -#define MRSAS_VERSION "06.707.04.03-fbsd" +#define MRSAS_VERSION "06.707.05.00-fbsd" #define MRSAS_ULONG_MAX 0xFFFFFFFFFFFFFFFF #define MRSAS_DEFAULT_TIMEOUT 0x14 /* Temporarily set */ #define DONE 0