All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: 2.6.0-test8  scsi logging not working
@ 2003-10-24  3:10 jtholmesjr
  2003-10-24  3:36 ` mmap to Access PCI space? Randall Hyde
  2003-10-24  5:17 ` 2.6.0-test8 scsi logging not working Mike Anderson
  0 siblings, 2 replies; 4+ messages in thread
From: jtholmesjr @ 2003-10-24  3:10 UTC (permalink / raw)
  To: linux-kernel

I dont take the mail list dist just answer here in and i will see the
answer.

The problem:

I thought
echo "scsi log all" >/proc/scsi/scsi 
with
scsi_logging=y  in .config
would turn on kernel scsi logging and put some notification line
in /var/log/messages
indicating scsi logging was now active at such and such a level

that is not happening and I have a external drive connected via
usb talking scsi that cannot be unmounted and i need to trace
scsi action so I can post here.

lsscsi output is
[0:0:0:0]    disk    USB 2.0  Storage Device   0100  /dev/sda
[1:0:0:0]    disk    Linux    scsi_debug       0004  /dev/sdb



any help would be appreciated.
thanks
jt
--
Please respond to 
jtholmes@jtholmes.com
Not to  jtholmesjr@comcast.net

^ permalink raw reply	[flat|nested] 4+ messages in thread

* mmap to Access PCI space?
  2003-10-24  3:10 2.6.0-test8 scsi logging not working jtholmesjr
@ 2003-10-24  3:36 ` Randall Hyde
  2003-10-24  7:57   ` David S. Miller
  2003-10-24  5:17 ` 2.6.0-test8 scsi logging not working Mike Anderson
  1 sibling, 1 reply; 4+ messages in thread
From: Randall Hyde @ 2003-10-24  3:36 UTC (permalink / raw)
  To: linux-kernel

Hi All,
I need to access a couple of SATA chips from a user-mode
program (yep, running as root). I know for a fact that my
chip resides at address 0xfc300000 (/proc/iomem and /proc/ide/siimage
tells me this).  Can I do a mmap like the following to access the registers
on ths chip?

fdDevMem = open( "/dev/mem", O_RDWR );
ptr =
    mmap
    (
        NULL,
        4096,
        PROT_READ | PROT_WRITE,
        MAP_SHARED,
        fdDevMem,
        0xfc300000
    );

When I try this, I get a valid pointer back, but it doesn't seem to
be mapped to my si3112 chip register bank.

I've also used code like the following:
ptr =
    mmap
    (
        0xfc300000,
        4096,
        PROT_READ | PROT_WRITE,
        MAP_SHARED | MAP_ANONYMOUS,
        -1,
        0
    );

Same story.
If I use MAP_FIXED and/or MAP_PRIVATE, the mmap call fails.

What am I doing wrong here?
Thanks,
Randy Hyde


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 2.6.0-test8  scsi logging not working
  2003-10-24  3:10 2.6.0-test8 scsi logging not working jtholmesjr
  2003-10-24  3:36 ` mmap to Access PCI space? Randall Hyde
@ 2003-10-24  5:17 ` Mike Anderson
  1 sibling, 0 replies; 4+ messages in thread
From: Mike Anderson @ 2003-10-24  5:17 UTC (permalink / raw)
  To: jtholmes; +Cc: linux-kernel

jtholmesjr@comcast.net [jtholmesjr@comcast.net] wrote:
> The problem:
> 
> I thought
> echo "scsi log all" >/proc/scsi/scsi 
> with
> scsi_logging=y  in .config
> would turn on kernel scsi logging and put some notification line
> in /var/log/messages
> indicating scsi logging was now active at such and such a level
> 
> that is not happening and I have a external drive connected via
> usb talking scsi that cannot be unmounted and i need to trace
> scsi action so I can post here.
> 
> lsscsi output is
> [0:0:0:0]    disk    USB 2.0  Storage Device   0100  /dev/sda
> [1:0:0:0]    disk    Linux    scsi_debug       0004  /dev/sdb
> 

The scsi logging interface switched control from proc to sysctl. 

sysctl -w dev.scsi.logging_level=0xffffffff

Will result in a scsi log all. You need to use caution if syslogd is
running and you have other scsi devices.

-andmike
--
Michael Anderson
andmike@us.ibm.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: mmap to Access PCI space?
  2003-10-24  3:36 ` mmap to Access PCI space? Randall Hyde
@ 2003-10-24  7:57   ` David S. Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David S. Miller @ 2003-10-24  7:57 UTC (permalink / raw)
  To: Randall Hyde; +Cc: linux-kernel

On Thu, 23 Oct 2003 20:36:12 -0700
"Randall Hyde" <randyhyde@earthlink.net> wrote:

> I need to access a couple of SATA chips from a user-mode
> program (yep, running as root). I know for a fact that my
> chip resides at address 0xfc300000 (/proc/iomem and /proc/ide/siimage
> tells me this).  Can I do a mmap like the following to access the registers
> on ths chip?
> 
> fdDevMem = open( "/dev/mem", O_RDWR );
> ptr =
>     mmap
>     (
>         NULL,
>         4096,
>         PROT_READ | PROT_WRITE,
>         MAP_SHARED,
>         fdDevMem,
>         0xfc300000
>     );

That's not portable and will only work on a few platforms.
Please use mmap() and ioctl() operations on /proc/bus/pci/*
nodes to accomplish your task.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-10-24  7:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-24  3:10 2.6.0-test8 scsi logging not working jtholmesjr
2003-10-24  3:36 ` mmap to Access PCI space? Randall Hyde
2003-10-24  7:57   ` David S. Miller
2003-10-24  5:17 ` 2.6.0-test8 scsi logging not working Mike Anderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.