Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Pb patch pour ehci-hcd (Pb USB2)

2 réponses
Avatar
Bosc Emmanuel
Bonjour,

Pour tenter quelque chose pour mon problème de ehci-hcd (carte mère Asus
P4P800), j'ai tenté de patcher avec le ehci-handoff-2.patch suivant :
en root, j'ai fait :
cd /usr/src/
patch -p1 < ehci-handoff-2.patch

il me demande alors quel fichier doit être patché.
Lequel faut-il ?
(j'ai aussi essayé patch -p0 < ehci-hcd.patch
et aussi dans /usr/src/linux/ mais sans succès)

Je joins le code du patch 'ehci-handoff-2.patch' au cas où ça parle à
quelqu'un...
merci
Emmanuel

#########################
commit d49d431744007cec0ee1a3ade96f9e0f100c7907
tree 4ed2f01c98b8fdf0ecd7a92d61f7c1af8beb58a2
parent 9198769363d4dc1d63d49ecb2e2b189aceb42d94
author David Brownell <david-b@pacbell.net> 1115497310 -0700
committer Greg Kroah-Hartman <gregkh@suse.de> 1119908635 -0700

[PATCH] USB: misc ehci updates

Various minor EHCI updates

* Dump some more info in the debug dumps, notably the product
description (e.g. chip vendor), BIOS handhake flags, and
debug port status (when it's not managed by the HCD).

* Minor updates to the BIOS handoff code: always flag the HCD
as owned by Linux (in case BIOS doesn't grab it "early"),
and on the buggy-BIOS path always match the "early handoff"
code and forcibly disable SMI IRQs.

* For the disabled 64bit DMA support, there's now a constant
to use for the mask; use it.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

D:100644 100644 2ff11d53567bcbfd0fdaf48de5dfc545d6d93eab
50cb01831075916c5f8e828f5e15f1ddd0df91df M drivers/usb/host/ehci-dbg.c
R:100644 100644 527abc693b17841ade6acdf2a673ab5fc5b260e7
35248a37b7174ad807110fa74eef1382fe4c4f80 M drivers/usb/host/ehci-hcd.c
D:100644 100644 d7b4f7939ded4d16989478ca58fa3edc573fb728
36cc1f2218d55d203434aafb0698773291b48e4b M drivers/usb/host/ehci-hub.c
D:100644 100644 7df9b9af54f60205b09a6e490db182c33ef922ec
45d89a7083b13f4bfd30b319f438c2b996948260 M drivers/usb/host/ehci-q.c

Key:
S: Skipped
I: Included Included verbatim
D: Deleted Manually deleted by subsequent user edit
R: Revised Manually revised by subsequent user edit

Only include bios_handoff change and rediff for 2.6.8 - Horms

--- a/drivers/usb/host/ehci-hcd.c 2005-07-04 20:49:26.000000000 +0900
+++ b/drivers/usb/host/ehci-hcd.c 2005-07-04 20:52:40.000000000 +0900
@@ -288,30 +288,32 @@
*/
static int bios_handoff (struct ehci_hcd *ehci, int where, u32 cap)
{
- if (cap & (1 << 16)) {
- int msec = 5000;
- struct pci_dev *pdev = to_pci_dev(ehci->hcd.self.controller);
+struct pci_dev *pdev = to_pci_dev(ehci_to_hcd(ehci)->self.controller);
+ struct pci_dev *pdev = to_pci_dev(ehci_to_hcd(ehci)->self.controller);

- /* request handoff to OS */
- cap |= 1 << 24;
- pci_write_config_dword(pdev, where, cap);
+ /* always say Linux will own the hardware */
+ pci_write_config_byte(pdev, where + 3, 1);

- /* and wait a while for it to happen */
+ /* maybe wait a while for BIOS to respond */
+ if (cap & (1 << 16)) {
do {
msleep(10);
msec -= 10;
pci_read_config_dword(pdev, where, &cap);
} while ((cap & (1 << 16)) && msec);
if (cap & (1 << 16)) {
- ehci_err (ehci, "BIOS handoff failed (%d, %04x)\n",
+ ehci_err(ehci, "BIOS handoff failed (%d, %04x)\n",
where, cap);
// some BIOS versions seem buggy...
// return 1;
ehci_warn (ehci, "continuing after BIOS bug...\n");
- return 0;
- }
- ehci_dbg (ehci, "BIOS handoff succeeded\n");
+ /* disable all SMIs, and clear "BIOS owns" flag */
+ pci_write_config_dword(pdev, where + 4, 0);
+ pci_write_config_byte(pdev, where + 2, 0);
+ } else
+ ehci_dbg(ehci, "BIOS handoff succeeded\n");
}
+
return 0;
}
#######################


--
Lisez la FAQ de la liste avant de poser une question :
http://wiki.debian.net/?DebianFrench
Vous pouvez aussi ajouter le mot ``spam'' dans vos champs "From" et
"Reply-To:"

To UNSUBSCRIBE, email to debian-user-french-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

2 réponses

Avatar
Thierry B
Bosc Emmanuel a écrit :
Bonjour,

Pour tenter quelque chose pour mon problème de ehci-hcd (carte mère Asus
P4P800), j'ai tenté de patcher avec le ehci-handoff-2.patch suivant :
en root, j'ai fait :
cd /usr/src/
patch -p1 < ehci-handoff-2.patch

il me demande alors quel fichier doit être patché.
Lequel faut-il ?
(j'ai aussi essayé patch -p0 < ehci-hcd.patch
et aussi dans /usr/src/linux/ mais sans succès)

Je joins le code du patch 'ehci-handoff-2.patch' au cas où ça parle à
quelqu'un...
merci
Emmanuel

#########################
commit d49d431744007cec0ee1a3ade96f9e0f100c7907
tree 4ed2f01c98b8fdf0ecd7a92d61f7c1af8beb58a2
parent 9198769363d4dc1d63d49ecb2e2b189aceb42d94
author David Brownell 1115497310 -0700
committer Greg Kroah-Hartman 1119908635 -0700

[PATCH] USB: misc ehci updates

Various minor EHCI updates

* Dump some more info in the debug dumps, notably the product
description (e.g. chip vendor), BIOS handhake flags, and
debug port status (when it's not managed by the HCD).

* Minor updates to the BIOS handoff code: always flag the HCD
as owned by Linux (in case BIOS doesn't grab it "early"),
and on the buggy-BIOS path always match the "early handoff"
code and forcibly disable SMI IRQs.

* For the disabled 64bit DMA support, there's now a constant
to use for the mask; use it.

Signed-off-by: David Brownell
Signed-off-by: Greg Kroah-Hartman

D:100644 100644 2ff11d53567bcbfd0fdaf48de5dfc545d6d93eab
50cb01831075916c5f8e828f5e15f1ddd0df91df M drivers/usb/host/ehci-dbg.c
R:100644 100644 527abc693b17841ade6acdf2a673ab5fc5b260e7
35248a37b7174ad807110fa74eef1382fe4c4f80 M drivers/usb/host/ehci-hcd.c
D:100644 100644 d7b4f7939ded4d16989478ca58fa3edc573fb728
36cc1f2218d55d203434aafb0698773291b48e4b M drivers/usb/host/ehci-hub.c
D:100644 100644 7df9b9af54f60205b09a6e490db182c33ef922ec
45d89a7083b13f4bfd30b319f438c2b996948260 M drivers/usb/host/ehci-q.c

Key:
S: Skipped
I: Included Included verbatim
D: Deleted Manually deleted by subsequent user edit
R: Revised Manually revised by subsequent user edit

Only include bios_handoff change and rediff for 2.6.8 - Horms

--- a/drivers/usb/host/ehci-hcd.c 2005-07-04 20:49:26.000000000 +0900
+++ b/drivers/usb/host/ehci-hcd.c 2005-07-04 20:52:40.000000000 +0900
@@ -288,30 +288,32 @@
*/
static int bios_handoff (struct ehci_hcd *ehci, int where, u32 cap)
{
- if (cap & (1 << 16)) {
- int msec = 5000;
- struct pci_dev *pdev = to_pci_dev(ehci->hcd.self.controller);
+struct pci_dev *pdev = to_pci_dev(ehci_to_hcd(ehci)->self.controller);
+ struct pci_dev *pdev = to_pci_dev(ehci_to_hcd(ehci)->self.controller);

- /* request handoff to OS */
- cap |= 1 << 24;
- pci_write_config_dword(pdev, where, cap);
+ /* always say Linux will own the hardware */
+ pci_write_config_byte(pdev, where + 3, 1);

- /* and wait a while for it to happen */
+ /* maybe wait a while for BIOS to respond */
+ if (cap & (1 << 16)) {
do {
msleep(10);
msec -= 10;
pci_read_config_dword(pdev, where, &cap);
} while ((cap & (1 << 16)) && msec);
if (cap & (1 << 16)) {
- ehci_err (ehci, "BIOS handoff failed (%d, %04x)n",
+ ehci_err(ehci, "BIOS handoff failed (%d, %04x)n",
where, cap);
// some BIOS versions seem buggy...
// return 1;
ehci_warn (ehci, "continuing after BIOS bug...n");
- return 0;
- }
- ehci_dbg (ehci, "BIOS handoff succeededn");
+ /* disable all SMIs, and clear "BIOS owns" flag */
+ pci_write_config_dword(pdev, where + 4, 0);
+ pci_write_config_byte(pdev, where + 2, 0);
+ } else
+ ehci_dbg(ehci, "BIOS handoff succeededn");
}
+
return 0;
}
#######################





Salut,

Ca a l'air d'etre ehci-hcd.c d'après ton post.

debian:/usr/src/linux# find -name "ehci-hcd.c"
./drivers/usb/host/ehci-hcd.c

ca voudrait dire donc que si tu appliques le patch depuis le repertoire
même qui contient le fichier à patcher (cad dans
/usr/src/linux/drivers/usb/host/), fo mettre p0, et si tu descends d'un
cran, cad dans /usr/src/linux/drivers/usb/ c'est p1 et ainsi de suite...

Je te dis ça de mémoire, car je patche vraiment que très très peu donc c
pas fiable à 100% lol, mais c tjs essyable.

Tu sauvegardes on fichier qqque part, tu testes et tu compares les
tailles de fichiers.

Au pire, ca ne fait rien et au moieux ca patche ton fichier :-)

Bon courage.

A+


--
Lisez la FAQ de la liste avant de poser une question :
http://wiki.debian.net/?DebianFrench
Vous pouvez aussi ajouter le mot ``spam'' dans vos champs "From" et
"Reply-To:"

To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact
Avatar
Frédéric Bothamy
Selon Bosc Emmanuel :

Bonjour,

Pour tenter quelque chose pour mon problème de ehci-hcd (carte mère Asus
P4P800), j'ai tenté de patcher avec le ehci-handoff-2.patch suivant :
en root, j'ai fait :
cd /usr/src/
patch -p1 < ehci-handoff-2.patch



Ce patch a été intégré dans la version 2.6.13 du noyau. Donc, à moins que
tu aies une version avant celle-ci, tu n'as pas besoin d'appliquer ce patch.


Fred


--
Lisez la FAQ de la liste avant de poser une question :
http://wiki.debian.net/?DebianFrench
Vous pouvez aussi ajouter le mot ``spam'' dans vos champs "From" et
"Reply-To:"

To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact