lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 26 Jul 2013 10:57:10 -0700
From:	Dave Hansen <dave@...1.net>
To:	Aaron Lu <aaron.lu@...el.com>
CC:	Tejun Heo <tj@...nel.org>, linux-ide@...r.kernel.org,
	LKML <linux-kernel@...r.kernel.org>,
	Shane Huang <shane.huang@....com>
Subject: Re: SATA hotplug not detecting new disks

On 07/25/2013 06:51 PM, Aaron Lu wrote:
> On 07/26/2013 07:15 AM, Dave Hansen wrote:
>> I've got a relatively new system that doesn't seem to be able to hotplug
>> SATA disks.  I see the same behavior on 3.10, 3.11-rc2, and Ubuntu's
>> 3.8.0-25-generic.  The disks are detected right away on reboots, but
>> even after poking the /sys/class/scsi_host/host*/scan files, new disks
>> are never detected.  I've disabled link power management.
>>
>> Am I doing something stupid here?  I thought this "just worked" on my
>> previous hardware.
> 
> My vague memory reminds me that not all SATA ports are hot pluggable -
> you can check the port's "External SATA port" bit and "Hot Plug Capable"
> bit of the PxCMD register like this:
> 
> $ grep ahci /proc/iomem 
>     e1a40000-e1a407ff : ahci
> # dd if=/dev/mem of=ahcidump bs=4096 count=1 skip=0xe1a40
> You will need to change 0xe1a40 to decimal format.
> 
> Then the PxCMD is at offset 0x118 for port 0, check bit 21 for E-SATA or
> bit 18 for hot pluggable bits. If any of them set to 1, this port
> should be hot pluggable; otherwise, it doesn't have this capability.

That whole I/O area looks to be 0'd to me, at least for the port if I
boot with it unplugged.  I even tried toggling the PORT_CMD_ALPE bit
with powertop since it is in the same port.  Nothing seems to happen for
port0 (the one unplugged at boot), although I _can_ see the writes show
up for the other ports.

I also tried booting with a disk plugged in to a port, then put that
disk to sleep and unplugged it.  I replugged a _different_ disk in its
place, and it was detected just fine.

Is it possible that the 'ata_dummy_port_ops' are getting left in place
at boot accidentally, that we're mistaking an unplugged port for a
disabled one?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ