Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Jun 2015 12:00:52 +0000 (UTC)
From:      Kashyap D Desai <kadesai@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r284873 - head/sys/dev/mrsas
Message-ID:  <201506261200.t5QC0q2T091680@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506261200.t5QC0q2T091680>