SATA hotplug status (sii3114)

0 views
Skip to first unread message

Andy Helten

unread,
Jan 14, 2005, 3:30:13 PM1/14/05
to linux-kernel
Hello,

Can anyone tell me the current status of hotplug support? The SATA web
site says only this:

> libata does not support hotplug... yet.


Is there a plan or design for adding hotplug support? Can anyone point
me to any discussions on this matter. I am new to Linux kernel
development, but I have searched the archives and found nothing very
helpful (except for the mention of the echo commands I tried below).
There could be a simple solution that is evading me, but I've looked for
two days now without much success.

I am running kernel version 2.4.25-elinos-53 with the 2.4.25-libata16
patch. The CPU is a PowerPC 8245 and the SATA controller is an
Sii3114. The processor board provides hotplug support which, at least
at a hardware level, allows safe removal and insertion of the drives.
However, the software does not appear to handle the re-install very
well. Note that before a remove/insert cycle, the drive seems to work
fine (I haven't tested it very extensively). This could also be an
issue with the way hardware brings the drive back up after hotplug
insertion (I am also not that familiar with SATA just yet).

Thanks for any help,
Andy


*****

If interested, here is what I've done thus far:

I've tried rescanning the bus using 'echo "rescan" > /proc/scsi/scsi'
and explicitly adding/removing the device using 'add-single-device' and
'remove-single-device'. None of these seem to help the device recover
following a drive hotplug remove/insert. For example, I issue the
'remove-single-device' command, remove the drive, re-insert the drive,
and issue the 'add' command. I verify that the drive is indeed removed
from /proc/scsi/scsi and then added back after the 'add' command, but
accessing the drive does not work following the hotplug insertion. In
fact, the 'add' command never returns to the command line, although the
kernel does continue to run and I can use another terminal to look at
/proc/scsi/scsi.

I've also tried the 'add' and 'remove' commands without physically
removing the drive. After this, I can remount the drive and read/write
it without problems. This seems to prove that the act of hotplug
removal/insertion is the real issue.


Here is a console session of a remove/insert cycle:

[1 /]#cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: HTE726040M9AT00 Rev: 1.02
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: HTE726040M9AT00 Rev: 1.02
Type: Direct-Access ANSI SCSI revision: 05
[2 /]#echo "scsi remove-single-device 0 0 0 0" >/proc/scsi/scsi
[3 /]#cat /proc/scsi/scsi
Attached devices:
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: HTE726040M9AT00 Rev: 1.02
Type: Direct-Access ANSI SCSI revision: 05
[4 /]#

/* drive is removed */

cpld.o: shuttle 1: released /* msg from interrupt routine */

[4 /]#cat /proc/scsi/scsi
Attached devices:
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: HTE726040M9AT00 Rev: 1.02
Type: Direct-Access ANSI SCSI revision: 05
[5 /]#

/* drive is inserted */

cpld.o: shuttle 1: inserted /* msg from interrupt routine */

[5 /]#cat /proc/scsi/scsi
Attached devices:
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: HTE726040M9AT00 Rev: 1.02
Type: Direct-Access ANSI SCSI revision: 05
[6 /]#echo "scsi add-single-device 0 0 0 0" >/proc/scsi/scsi
scsi singledevice 0 0 0 0
Vendor: ATA Model: HTE726040M9AT00 Rev: 1.02
Type: Direct-Access ANSI SCSI revision: 05
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
SCSI device sda: 78140160 512-byte hdwr sectors (40008 MB)
sda:<3>ata1: DMA timeout, stat 0x1
ATA: abnormal status 0xD0 on port 0xD1042C87
scsi0: ERROR on channel 0, id 0, lun 0, CDB: 0x28 00 00 00 00 00 00 00 08 00
Current sd08:00: sns = 70 3
ASC=11 ASCQ= 4
Raw sense data:0x70 0x00 0x03 0x00 0x00 0x00 0x00 0x06 0x00 0x00 0x00
0x00 0x11
0x04
I/O error: dev 08:00, sector 0

[7 /]#cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: HTE726040M9AT00 Rev: 1.02
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: Model: Rev:
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: HTE726040M9AT00 Rev: 1.02
Type: Direct-Access ANSI SCSI revision: 05


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Jeff Garzik

unread,
Jan 14, 2005, 5:13:35 PM1/14/05
to Andy Helten, linux-kernel, linu...@vger.kernel.org
Andy Helten wrote:
> Hello,
>
> Can anyone tell me the current status of hotplug support? The SATA web
> site says only this:
>
>> libata does not support hotplug... yet.
>
>
>
> Is there a plan or design for adding hotplug support? Can anyone point
> me to any discussions on this matter. I am new to Linux kernel
> development, but I have searched the archives and found nothing very
> helpful (except for the mention of the echo commands I tried below).
> There could be a simple solution that is evading me, but I've looked for
> two days now without much success.


There's a plan but no code yet. :)

linu...@vger.kernel.org is where this stuff gets discussed (though
there's nothing on there recently about hotplug).

Jeff

Reply all
Reply to author
Forward
0 new messages