mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Ed Sweetman <safemode@comcast.net>
Cc: Nick Warne <nick@linicks.net>, linux-kernel@vger.kernel.org
Subject: Re: 8139too PCI IRQ issues   WAS Re: 2.6.12 breaks 8139cp
Date: Mon, 27 Jun 2005 22:27:40 +0900	[thread overview]
Message-ID: <87fyv43p6b.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <42BEC2B6.6020905@comcast.net> (Ed Sweetman's message of "Sun, 26 Jun 2005 10:59:02 -0400")

[-- Attachment #1: Type: text/plain, Size: 595 bytes --]

Ed Sweetman <safemode@comcast.net> writes:

> What are you supposed to do though if you dont have that bios option.
> And if the bios wasn't changed between kernel version upgrades, what
> is the PCI irq subsystem doing now that requires such a change? And
> what makes it possible to remove the problem with reverting just the
> 8139too driver ...   There is a quirk here, but the fix should be in
> the kernel, since not all bios' allow you to make the fix yourself. 

Can you post the detail? (/proc/interrupt, mptable, 8259A.pl, lspci -vvv)
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 8259A.pl --]
[-- Type: text/x-perl, Size: 1145 bytes --]

#!/usr/bin/perl
#
# 8259A
#

use strict;
use warnings;

use Getopt::Std;

sub outb
{
    my $data = shift;
    my $port = shift;

    open(IO, "> /dev/port") || die;
    sysseek(IO, $port, 0) || die;
    my $x = pack("C", $data);
    syswrite(IO, $x, 1);
    close(IO);
}

sub inb
{
    my $port = shift;
    my $data;

    open(IO, "/dev/port") || die;
    sysseek(IO, $port, 0) || die;
    sysread(IO, $data, 1);
    close(IO);

    return unpack("C", $data);
}

sub set_edge_level
{
    my $irq = shift;
    my $to = shift;
    my $mask = 1 << ($irq & 7);
    my $port = 0x4d0 + ($irq >> 3);
    my $val = inb($port);

    if ($to eq "edge") {
	outb($val & ~$mask, $port);
    } else {
	outb($val | $mask, $port);
    }
    print "irq $irq: -> $to\n";
}

our($opt_e, $opt_l);
getopts('e:l:');

if ($opt_e and ($opt_e < 15)) {
    set_edge_level($opt_e, "edge");
} elsif ($opt_l and ($opt_l < 15)) {
    set_edge_level($opt_l, "level");
}

foreach my $irq (0..15) {
    my $mask = 1 << ($irq & 7);
    my $port = 0x4d0 + ($irq >> 3);
    my $val = inb($port);

    printf "irq %d: %02x, %s\n", $irq, $val, ($val & $mask) ? "level" : "edge";
}

      parent reply	other threads:[~2005-06-27 15:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-26 13:46 Nick Warne
2005-06-26 14:59 ` 8139too PCI IRQ issues WAS " Ed Sweetman
2005-06-26 15:03   ` Nick Warne
2005-06-27 13:27   ` OGAWA Hirofumi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fyv43p6b.fsf@devron.myhome.or.jp \
    --to=hirofumi@mail.parknet.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nick@linicks.net \
    --cc=safemode@comcast.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome