Date: Fri, 21 Nov 2008 03:03:57 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r185140 - head/sys/dev/cardbus Message-ID: <200811210303.mAL33vZD071619@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Fri Nov 21 03:03:57 2008 New Revision: 185140 URL: http://svn.freebsd.org/changeset/base/185140 Log: Create a /dev/cardbus%d.cis, to be compatible with older versions of the software. This is a trivial amount of code to keep wireless monitoring software working... I plan on removing it in 9.0. Modified: head/sys/dev/cardbus/cardbus_device.c head/sys/dev/cardbus/cardbusvar.h Modified: head/sys/dev/cardbus/cardbus_device.c ============================================================================== --- head/sys/dev/cardbus/cardbus_device.c Fri Nov 21 02:23:14 2008 (r185139) +++ head/sys/dev/cardbus/cardbus_device.c Fri Nov 21 03:03:57 2008 (r185140) @@ -118,7 +118,9 @@ cardbus_device_create(struct cardbus_sof devi->sc_cisdev = make_dev(&cardbus_cdevsw, minor, 0, 0, 0666, "cardbus%d.%d.cis", device_get_unit(sc->sc_dev), devi->pci.cfg.func); - /* XXX need cardbus%d.cis compat layer here ? */ + if (devi->pci.cfg.func == 0) + devi->sc_cisdev_compat = make_dev_alias(devi->sc_cisdev, + "cardbus%d.cis", device_get_unit(sc->sc_dev)); devi->sc_cisdev->si_drv1 = devi; return (0); } @@ -128,6 +130,8 @@ cardbus_device_destroy(struct cardbus_de { if (devi->sc_cisdev) destroy_dev(devi->sc_cisdev); + if (devi->sc_cisdev_compat) + destroy_dev(devi->sc_cisdev_compat); return (0); } Modified: head/sys/dev/cardbus/cardbusvar.h ============================================================================== --- head/sys/dev/cardbus/cardbusvar.h Fri Nov 21 02:23:14 2008 (r185139) +++ head/sys/dev/cardbus/cardbusvar.h Fri Nov 21 03:03:57 2008 (r185140) @@ -60,6 +60,7 @@ struct cardbus_devinfo } funce; uint32_t fepresent; /* bit mask of funce values present */ struct cdev *sc_cisdev; + struct cdev *sc_cisdev_compat; struct cis_buffer sc_cis; };
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811210303.mAL33vZD071619>