[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#675289: marked as done (libpciaccess: Implement legacy map & io for hurd-i386)



Your message dated Mon, 12 Aug 2013 10:18:50 +0000
with message-id <E1V8pD8-0001jO-Eg@franck.debian.org>
and subject line Bug#675289: fixed in libpciaccess 0.13.2-1
has caused the Debian Bug report #675289,
regarding libpciaccess: Implement legacy map & io for hurd-i386
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
675289: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=675289
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: libpciaccess
Version: 0.13.1-2
Severity: important
Tags: patch
User: debian-hurd@lists.debian.org
Usertags: hurd

Hello,

Just like kfreebsd needed in #669062, hurd-i386 needs legacy map & io
support in libpciaccess, otherwise Xorg segfaults, here is a patch.

Samuel

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.4 (SMP w/8 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

-- 
Samuel Thibault <samuel.thibault@fnac.net>
<A>  mr  -  remove the home of correct users who accidentally enter mr
<A>        instead of rm
--- src/x86_pci.c.original	2012-05-31 03:03:48.000000000 +0000
+++ src/x86_pci.c	2012-05-31 03:20:17.000000000 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009 Samuel Thibault
+ * Copyright (c) 2009, 2012 Samuel Thibault
  * Heavily inspired from the freebsd, netbsd, and openbsd backends
  * (C) Copyright Eric Anholt 2006
  * (C) Copyright IBM Corporation 2006
@@ -550,6 +550,92 @@
     x86_disable_io();
 }
 
+static struct pci_io_handle *
+pci_device_x86_open_legacy_io(struct pci_io_handle *ret,
+    struct pci_device *dev, pciaddr_t base, pciaddr_t size)
+{
+    x86_enable_io();
+
+    ret->base = base;
+    ret->size = size;
+
+    return ret;
+}
+
+static void
+pci_device_x86_close_io(struct pci_device *dev, struct pci_io_handle *handle)
+{
+    x86_disable_io();
+}
+
+static uint32_t
+pci_device_x86_read32(struct pci_io_handle *handle, uint32_t reg)
+{
+    return inl(reg + handle->base);
+}
+
+static uint16_t
+pci_device_x86_read16(struct pci_io_handle *handle, uint32_t reg)
+{
+    return inw(reg + handle->base);
+}
+
+static uint8_t
+pci_device_x86_read8(struct pci_io_handle *handle, uint32_t reg)
+{
+    return inb(reg + handle->base);
+}
+
+static void
+pci_device_x86_write32(struct pci_io_handle *handle, uint32_t reg,
+		       uint32_t data)
+{
+    outl(data, reg + handle->base);
+}
+
+static void
+pci_device_x86_write16(struct pci_io_handle *handle, uint32_t reg,
+		       uint16_t data)
+{
+    outw(data, reg + handle->base);
+}
+
+static void
+pci_device_x86_write8(struct pci_io_handle *handle, uint32_t reg,
+		      uint8_t data)
+{
+    outb(data, reg + handle->base);
+}
+
+static int
+pci_device_x86_map_legacy(struct pci_device *dev, pciaddr_t base,
+    pciaddr_t size, unsigned map_flags, void **addr)
+{
+    struct pci_device_mapping map;
+    int err;
+
+    map.base = base;
+    map.size = size;
+    map.flags = map_flags;
+    err = pci_device_x86_map_range(dev, &map);
+    *addr = map.memory;
+
+    return err;
+}
+
+static int
+pci_device_x86_unmap_legacy(struct pci_device *dev, void *addr,
+    pciaddr_t size)
+{
+    struct pci_device_mapping map;
+
+    map.size = size;
+    map.flags = 0;
+    map.memory = addr;
+
+    return pci_device_generic_unmap_range(dev, &map);
+}
+
 static const struct pci_system_methods x86_pci_methods = {
     .destroy = pci_system_x86_destroy,
     .read_rom = pci_device_x86_read_rom,
@@ -559,6 +645,16 @@
     .read = pci_device_x86_read,
     .write = pci_device_x86_write,
     .fill_capabilities = pci_fill_capabilities_generic,
+    .open_legacy_io = pci_device_x86_open_legacy_io,
+    .close_io = pci_device_x86_close_io,
+    .read32 = pci_device_x86_read32,
+    .read16 = pci_device_x86_read16,
+    .read8 = pci_device_x86_read8,
+    .write32 = pci_device_x86_write32,
+    .write16 = pci_device_x86_write16,
+    .write8 = pci_device_x86_write8,
+    .map_legacy = pci_device_x86_map_legacy,
+    .unmap_legacy = pci_device_x86_unmap_legacy,
 };
 
 static int pci_probe(struct pci_system_x86 *pci_sys_x86)

--- End Message ---
--- Begin Message ---
Source: libpciaccess
Source-Version: 0.13.2-1

We believe that the bug you reported is fixed in the latest version of
libpciaccess, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 675289@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Julien Cristau <jcristau@debian.org> (supplier of updated libpciaccess package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Mon, 12 Aug 2013 12:10:47 +0200
Source: libpciaccess
Binary: libpciaccess0 libpciaccess0-udeb libpciaccess-dev
Architecture: source amd64
Version: 0.13.2-1
Distribution: sid
Urgency: low
Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
Changed-By: Julien Cristau <jcristau@debian.org>
Description: 
 libpciaccess-dev - Generic PCI access library for X - development files
 libpciaccess0 - Generic PCI access library for X
 libpciaccess0-udeb - Generic PCI access library for X (udeb)
Closes: 675289
Changes: 
 libpciaccess (0.13.2-1) unstable; urgency=low
 .
   * New upstream release.
     - FreeBSD legacy map and io patch is now upstream
     - implements hurd legacy map and io (closes: #675289)
   * Update d/copyright from COPYING.
Checksums-Sha1: 
 2e9e1d8dd3e0f27ed22b3a1879e07c3c5f95adb4 2138 libpciaccess_0.13.2-1.dsc
 0f2bf2e29de543ae3f85d29391ff7c66bd298395 431792 libpciaccess_0.13.2.orig.tar.gz
 316f521a3001266a634bccca1d50506fcaff887c 19547 libpciaccess_0.13.2-1.diff.gz
 4a45e9560bd1b183eccd91e1b81542c95690229b 46538 libpciaccess0_0.13.2-1_amd64.deb
 bc1583d8310db2146866f0a64f9bbf326bbfef6f 13860 libpciaccess0-udeb_0.13.2-1_amd64.udeb
 904ad0a5457e17cc966c97975d998f6b11496d1a 49486 libpciaccess-dev_0.13.2-1_amd64.deb
Checksums-Sha256: 
 db28b6c303617144fa2bbd4d2127248b11c3255a6e06cf8161edb81997496648 2138 libpciaccess_0.13.2-1.dsc
 b5459e347166113cefac80003dc5c431a8399ae936b3efcd2cef6437fbe88602 431792 libpciaccess_0.13.2.orig.tar.gz
 c86939cbff3a69429d1c190db24de0cee66eb72f667933d970e1156f7d49afd3 19547 libpciaccess_0.13.2-1.diff.gz
 9175ff86eda225a9bbf55cdee5851f3d5d5f89e778c403e8fc8ce9389181e355 46538 libpciaccess0_0.13.2-1_amd64.deb
 9b2b1ac53a68a0b217e916a2f516eb34c490d546ccd124dd45f5870ca4395999 13860 libpciaccess0-udeb_0.13.2-1_amd64.udeb
 4637f47df5929c2c6a94a6bc985712ae6a58edd3808116a8564e1bcb509cd1e8 49486 libpciaccess-dev_0.13.2-1_amd64.deb
Files: 
 ad121bfb251b6272b3d9949b7e352df4 2138 devel optional libpciaccess_0.13.2-1.dsc
 c49bd638c78fa4124e11432c1a94b5f4 431792 devel optional libpciaccess_0.13.2.orig.tar.gz
 80436a9bd94f596fcddb4f5191d34a5b 19547 devel optional libpciaccess_0.13.2-1.diff.gz
 e430cac17f284039afcbf65ddbeb7951 46538 libs optional libpciaccess0_0.13.2-1_amd64.deb
 f419d825edd7bd900beeb03abd25c3f9 13860 debian-installer optional libpciaccess0-udeb_0.13.2-1_amd64.udeb
 da76695f55188cee02c84897087965c8 49486 libdevel optional libpciaccess-dev_0.13.2-1_amd64.deb
Package-Type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)

iQIcBAEBAgAGBQJSCLVvAAoJEDEBgAUJBeQMAF4QAMs/tve1M8s7GPRKALMvNMJa
lamXOjc5ed1PN5gnaTpFhBs66sMVHP5j2uN3ytAtutGIu5d2S8qCbXb6fZrnxhub
HbjygvRKx0LGUwzc8CqIJ0XGEVZxN3wfXBVI7X0M0UDxR8HtsmXehpIzTj973Xgd
I9+4jqtUvLRW8Yt0rQFmQHwvJdPQ7qUjYEN61+gHvgSq+CENXoOYC9UuB+CGwiRP
sYfUP6xDIha8Ea5bFnuJUnxzZcWegFQXtIpa45H6Ult1bdiqNqVpm8QGKQZz4Scl
I1pASipDxeamcIL6ikoO2ULN30hyoOV46Vn2xJxP4b8m8VkvPtSmFjTG2K0MFSEd
Cx6YXrjdJUub4GhrvRSaDbFki02v24//iEjKBZb2n1J/8oL3Kj/G3YQLQ/slztp6
jSumAgBXPicJmSYU6uRHQjrt+TYBB0ivtN1TQnsosy4kCBfMzh7xWnriVHYrZnIC
5nwyDu3rxk0lP2+EH4o4MprHIysjxtAD11zu6XR/1C99WLiJG7Yt19zEd96CnpiT
nUFMC6wAyXLgNyrDXxWvEueTH07xhdC9iP+lHeCxaG6AmjPNJw8ciiRNdpOrQWSZ
yLhllTooiwVoPKjpvxM+A0c8Xc4ej11Ln5oxEmT0cytBP4BaeTq3Vio0fKFUQQ1z
8DqAl18GJ5xIbcukiqHB
=w3EE
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: