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
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to