Re: How to assess PMP register

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

 



- you can not access a PMP device from user space directly because
there is no file descriptor for it.
- however, libata stores a dump of PMP registers taken after every
reset in gscr structure of the ata_device structure that represent the
PMP in the kernel. You can modify libata to print the registers you
need.
- To reset the PMP, you would have to alter ata_scsi_user_scan() to
include looping through the host port and force reset on the whole ata
port by issuing echo "- - -" > /sys/class/scsi_host/hostX/scan
Instead of ata_for_each_link(link, ap, EDGE), do
ata_for_each_link(link, ap, HOST_FIRST)

Gwendal.


On Mon, May 4, 2009 at 4:37 PM, Mark Lord <liml@xxxxxx> wrote:
> s ticket wrote:
>>>>
>>>> Is there any way to read PMP registers after hardreset/softreset?
>>>> SATA Controller is marvell 88SX7042 and driver is sata_mv.
>>>> I try to send 0xE4 and 0xE6 command to read/write PMP registers:
>>>
>>> ..
>>>>
>>>>       if (ioctl(fd, SG_IO, &io_hdr) == -1) {
>>>
>>> ..
>>>
>>> No, there is no existing way to access PMP registers from user space.
>>>
>> But what's the difference in dealing with '0xE4' and '0xE8' commands.
>> I found that only the two commands will reset the link
>
> ..
>
> There's no guaranteed way to do that (reset the link) from userspace either.
>
> You're trying to do device driver things -- those should be done inside
> the device driver in the kernel proper.
>
> Cheers
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ide" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux