From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Tech Writer" Subject: Can't unbind PCI sound card Date: Thu, 27 Sep 2007 08:10:22 -0400 Message-ID: <009001c800ff$61018850$6501a8c0@warbler> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1399296670==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: TechWtr@handspun.com List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --===============1399296670== Content-Type: multipart/alternative; boundary="----=_NextPart_000_008D_01C800DD.D9BDDBD0" This is a multi-part message in MIME format. ------=_NextPart_000_008D_01C800DD.D9BDDBD0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable This is my first post, so I am hoping this is the right place to ask my = question... I have been asked to test some training materials that we = received, and provide sample solutions. I've been unable to get one of = the exercises to work properly, even though it follows the same steps = that are available both in the documentation, and throughout the web. =20 The task is to unbind the PCI sound card from Domain0 and then assign it = to a new VM, as shown below. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (1) Load the pciback module by typing -> modprobe pciback (2) Get the PCI ID for the hardware you will be using by typing > lspci (3) Unbind the desired device intended for pciback. Go to = /sys/bus/drivers and look for the folder with your driver. Go in the = folder and you will see the sym link for the device starting with your = pci_id. Next -> echo -n [pci-slot-id] > /sys/bus/pci/drivers/e100/unbind Now that sym link you just checked out should be gone. (4) Now bind the device to pciback. echo -n [pci-slot-id] > /sys/bus/pci/drivers/pciback/new_slot echo -n [pci-slot-id] > /sys/bus/pci/drivers/pciback/bind Go to the pciback directory and you should see a new sym link created. Now configure your Virtual Machine (DomU) to use the device. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Every time I get to the command:=20 echo -n 0000:00:0b.0 > /sys/bus/pci/drivers/e100/unbind my terminal window locks up. Although I have no other processes running, = it appears the sound card is being used. I have tried this several = different ways, and can't seem to get past the unbind command. It's an = ensoniq card, so I tried to search for other dependencies and found:=20 # lsmod | grep ens snd_ens1371 30880 1 gameport 19464 1 snd_ens1371 snd_rawmidi 30848 2 snd_seq_midi,snd_ens1371 snd_ac97_codec 98592 1 snd_ens1371 snd_pcm 101124 3 snd_pcm_oss,snd_ens1371,snd_ac97_codec snd 63492 12 = snd_pcm_oss,snd_mixer_oss,snd_seq_midi,snd_seq,snd_ens1371,snd_rawmidi,sn= d_seq_device,snd_ac97_codec,snd_pcm,snd_timer # I can make the sound card available if I edit /etc/modprobe.conf.local = with: options pciback hide=3D(0000:00:0b.0)=20 and then reboot. However, I would like to find some way to get the = example that is so widely documented to work. Does anyone know how I = can ensure that the sound card is free and available so that the unbind = works correctly? Peg ------=_NextPart_000_008D_01C800DD.D9BDDBD0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
This is my first post, so I am hoping = this is the=20 right place to ask my question...  I = have been=20 asked to test some training materials that we received, and provide = sample=20 solutions.  I've been unable to get one of the exercises to work = properly,=20 even though it follows the same steps that are available both in the documentation, and throughout the=20 web.  
 
The task is = to unbind the=20 PCI sound card from Domain0 and then assign it to a new VM, as = shown=20 below.
 
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(1)=   Load the pciback=20 module by typing -> modprobe pciback
 
(2)  Get the PCI ID for the = hardware you will=20 be using by typing > lspci
 
(3)   Unbind the desired = device intended=20 for pciback. Go to /sys/bus/drivers and look for the folder with your = driver. Go=20 in the folder and you will see the sym link for the device starting with = your=20 pci_id. Next ->
 
echo -n [pci-slot-id] > =20 /sys/bus/pci/drivers/e100/unbind
 
Now that sym link you just checked out = should be=20 gone.
 
(4)  Now bind the device to=20 pciback.
 
echo -n [pci-slot-id] > =20 /sys/bus/pci/drivers/pciback/new_slot
echo -n [pci-slot-id] = > =20 /sys/bus/pci/drivers/pciback/bind
 
Go to the pciback directory and you = should see a=20 new sym link created.
 
Now configure your Virtual Machine = (DomU) to use=20 the = device.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 
Every time I get to the command:=20
    echo -n 0000:00:0b.0 > =20 /sys/bus/pci/drivers/e100/unbind
 
my terminal window locks up. Although I = have no=20 other processes running, it appears the sound card is being used.  = I have=20 tried this several different ways, and can't seem to get past the unbind = command.  It's an ensoniq card, so I tried to search for other = dependencies and found:
 
# lsmod | grep=20 ens
snd_ens1371         &= nbsp; =20 30880 =20 1
gameport          =     =20 19464  1=20 snd_ens1371
snd_rawmidi        = ;   =20 30848  2=20 snd_seq_midi,snd_ens1371
snd_ac97_codec     &= nbsp;  =20 98592  1=20 snd_ens1371
snd_pcm        &nb= sp;     =20 101124  3=20 snd_pcm_oss,snd_ens1371,snd_ac97_codec
snd    &nbs= p;            = ;  =20 63492  12=20 snd_pcm_oss,snd_mixer_oss,snd_seq_midi,snd_seq,snd_ens1371,snd_rawmidi,sn= d_seq_device,snd_ac97_codec,snd_pcm,snd_timer
#
 
I can make the sound card available if = I edit=20 /etc/modprobe.conf.local with:
    options pciback=20 hide=3D(0000:00:0b.0)
 
and then reboot.  However, I would like to find some way to get the example that = is so=20 widely documented to work.  Does anyone know how I can ensure that = the=20 sound card is free and available so that the unbind works=20 correctly?
 
Peg
------=_NextPart_000_008D_01C800DD.D9BDDBD0-- --===============1399296670== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1399296670==--