Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Jul 2013 21:02:45 +0000 (UTC)
From:      Jim Harris <jimharris@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r253107 - head/sys/dev/nvme
Message-ID:  <201307092102.r69L2jEu040627@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jimharris
Date: Tue Jul  9 21:02:45 2013
New Revision: 253107
URL: http://svnweb.freebsd.org/changeset/base/253107

Log:
  Add pci_enable_busmaster() and pci_disable_busmaster() calls in
  nvme_attach() and nvme_detach() respectively.
  
  Sponsored by:	Intel
  MFC after:	3 days

Modified:
  head/sys/dev/nvme/nvme.c

Modified: head/sys/dev/nvme/nvme.c
==============================================================================
--- head/sys/dev/nvme/nvme.c	Tue Jul  9 20:49:32 2013	(r253106)
+++ head/sys/dev/nvme/nvme.c	Tue Jul  9 21:02:45 2013	(r253107)
@@ -255,6 +255,8 @@ nvme_attach(device_t dev)
 
 	nvme_sysctl_initialize_ctrlr(ctrlr);
 
+	pci_enable_busmaster(dev);
+
 	ctrlr->config_hook.ich_func = nvme_ctrlr_start_config_hook;
 	ctrlr->config_hook.ich_arg = ctrlr;
 
@@ -269,6 +271,7 @@ nvme_detach (device_t dev)
 	struct nvme_controller	*ctrlr = DEVICE2SOFTC(dev);
 
 	nvme_ctrlr_destruct(ctrlr, dev);
+	pci_disable_busmaster(dev);
 	return (0);
 }
 



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