linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* libata question
@ 2006-08-01 15:18 Roger Oberholtzer
  2006-08-01 15:33 ` Tejun Heo
  2006-08-02  1:22 ` 31244 PCI Card sam song
  0 siblings, 2 replies; 16+ messages in thread
From: Roger Oberholtzer @ 2006-08-01 15:18 UTC (permalink / raw)
  To: htejun; +Cc: linux-ide


Should hotplug work with Intel Corporation 82801GB/GR/GH (ICH7 Family)
chipset? I am trying kernel 2.6.17.7

I have been trying the warmplug stuff. But I am not convinced it is
acting as I expect. If I remove a disk and then do a scan, shouldn't the
disk entry go away? I know about the problems with just removing a disk.
But this is with one that is not mounted. I just want to see if the
disks are properly sensed as coming and going. I am using the warmplug
instructions on your web site.


Thanks for any help.


-- 
Roger Oberholtzer

OPQ Systems AB
Ramböll Sverige AB
Kapellgränd 7
P.O. Box 4205
SE-102 65 Stockholm, Sweden

Tel: Int +46 8-615 60 20
Fax: Int +46 8-31 42 23


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

* Re: libata question
  2006-08-01 15:18 libata question Roger Oberholtzer
@ 2006-08-01 15:33 ` Tejun Heo
  2006-08-01 18:39   ` Roger Oberholtzer
  2006-08-02  1:22 ` 31244 PCI Card sam song
  1 sibling, 1 reply; 16+ messages in thread
From: Tejun Heo @ 2006-08-01 15:33 UTC (permalink / raw)
  To: Roger Oberholtzer; +Cc: linux-ide

Roger Oberholtzer wrote:
> Should hotplug work with Intel Corporation 82801GB/GR/GH (ICH7
> Family) chipset? I am trying kernel 2.6.17.7
> 
> I have been trying the warmplug stuff. But I am not convinced it is 
> acting as I expect. If I remove a disk and then do a scan, shouldn't
> the disk entry go away?

Eventually, yes.  Do you mind to send me the dmesg?

> I know about the problems with just removing a disk. But this is with
> one that is not mounted. I just want to see if the disks are properly
> sensed as coming and going. I am using the warmplug instructions on
> your web site.

There are some complications with piix PCS register (port 
enable/disable) which always seems to have some problem.  If you can use 
AHCI mode, it will be *much* better.

If you think the driver doesn't do the right thing(tm), please send me 
detailed info.  I'll try to fix the problem if possible or explain why 
it can't be fixed at the very least.

-- 
tejun

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

* Re: libata question
  2006-08-01 15:33 ` Tejun Heo
@ 2006-08-01 18:39   ` Roger Oberholtzer
  2006-08-01 18:45     ` Tejun Heo
  0 siblings, 1 reply; 16+ messages in thread
From: Roger Oberholtzer @ 2006-08-01 18:39 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-ide

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

On Wed, 2006-08-02 at 00:33 +0900, Tejun Heo wrote:
> Roger Oberholtzer wrote:
> > Should hotplug work with Intel Corporation 82801GB/GR/GH (ICH7
> > Family) chipset? I am trying kernel 2.6.17.7
> > 
> > I have been trying the warmplug stuff. But I am not convinced it is 
> > acting as I expect. If I remove a disk and then do a scan, shouldn't
> > the disk entry go away?
> 
> Eventually, yes.  Do you mind to send me the dmesg?

I have picked out the lines related to this. Some of the complaints at
the end are probably when I moved the disk. 

> > I know about the problems with just removing a disk. But this is with
> > one that is not mounted. I just want to see if the disks are properly
> > sensed as coming and going. I am using the warmplug instructions on
> > your web site.
> 
> There are some complications with piix PCS register (port 
> enable/disable) which always seems to have some problem.  If you can use 
> AHCI mode, it will be *much* better.

OK. How do I get it in ahci mode? I see that both the ata_piix and achi
drivers are loaded. This is what is loaded:

Module                  Size  Used by
xfs                   465784  0
af_packet              28040  2
ipv6                  238368  18
nfsd                  202244  9
exportfs                9600  1 nfsd
lockd                  57992  2 nfsd
nfs_acl                 7680  1 nfsd
sunrpc                142524  9 nfsd,lockd,nfs_acl
edd                    12740  0
loop                   18824  0
dm_mod                 54936  0
usbhid                 47328  0
ehci_hcd               32008  0
shpchp                 38304  0
uhci_hcd               24588  0
e1000                 104888  0
pci_hotplug            31548  1 shpchp
usbcore               115968  4 usbhid,ehci_hcd,uhci_hcd
ide_cd                 39712  0
cdrom                  36640  1 ide_cd
i2c_i801               12172  0
i2c_core               23552  1 i2c_i801
parport_pc             39780  1
lp                     15140  0
parport                37320  2 parport_pc,lp
ext3                  125576  2
jbd                    64032  1 ext3
sg                     35996  0
ata_piix               15492  0
ahci                   18436  0
processor              30056  0
libata                 65676  2 ata_piix,ahci
piix                   13444  0 [permanent]
sd_mod                 22656  0
scsi_mod              127624  4 sg,ahci,libata,sd_mod
ide_disk               19072  4
ide_core              118344  3 ide_cd,piix,ide_disk

> If you think the driver doesn't do the right thing(tm), please send me 
> detailed info.  I'll try to fix the problem if possible or explain why 
> it can't be fixed at the very least.

I bet the driver does the right thing. The trick is knowing what that is
supposed to be. And how to use the various commands on files in /sys at
the correct time and in the correct order.

--
Roger Oberholtzer


[-- Attachment #2: m.txt.gz --]
[-- Type: application/x-gzip, Size: 3477 bytes --]

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

* Re: libata question
  2006-08-01 18:39   ` Roger Oberholtzer
@ 2006-08-01 18:45     ` Tejun Heo
  2006-08-01 19:03       ` Roger Oberholtzer
  0 siblings, 1 reply; 16+ messages in thread
From: Tejun Heo @ 2006-08-01 18:45 UTC (permalink / raw)
  To: roger; +Cc: linux-ide

Roger Oberholtzer wrote:
> On Wed, 2006-08-02 at 00:33 +0900, Tejun Heo wrote:
>> Roger Oberholtzer wrote:
>>> Should hotplug work with Intel Corporation 82801GB/GR/GH (ICH7
>>> Family) chipset? I am trying kernel 2.6.17.7

Ah.. I should have spotted this earlier.  2.6.17.7 doesn't contain 
updated EH and doesn't support any of new features including 
hot/warmplug.  Please try 2.6.18-rc3.

>>> I have been trying the warmplug stuff. But I am not convinced it is 
>>> acting as I expect. If I remove a disk and then do a scan, shouldn't
>>> the disk entry go away?
>> Eventually, yes.  Do you mind to send me the dmesg?
> 
> I have picked out the lines related to this. Some of the complaints at
> the end are probably when I moved the disk. 

Yeap, those look pretty normal for the previous code.  :p

>>> I know about the problems with just removing a disk. But this is with
>>> one that is not mounted. I just want to see if the disks are properly
>>> sensed as coming and going. I am using the warmplug instructions on
>>> your web site.
>> There are some complications with piix PCS register (port 
>> enable/disable) which always seems to have some problem.  If you can use 
>> AHCI mode, it will be *much* better.
> 
> OK. How do I get it in ahci mode? I see that both the ata_piix and achi
> drivers are loaded. This is what is loaded:

Plain ICH7 doesn't support ahci. ICH7R supports ahci mode and usually 
configurable in the BIOS menu.  On my board (P5LD2), it's in the first 
page (the left-most one where the clock setting is and hard disks are 
enumerated), it's called IDE configuration or something.

>> If you think the driver doesn't do the right thing(tm), please send me 
>> detailed info.  I'll try to fix the problem if possible or explain why 
>> it can't be fixed at the very least.
> 
> I bet the driver does the right thing. The trick is knowing what that is
> supposed to be. And how to use the various commands on files in /sys at
> the correct time and in the correct order.

Really, it's not that complicated.

-- 
tejun

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

* Re: libata question
  2006-08-01 18:45     ` Tejun Heo
@ 2006-08-01 19:03       ` Roger Oberholtzer
  2006-08-01 19:06         ` Tejun Heo
  0 siblings, 1 reply; 16+ messages in thread
From: Roger Oberholtzer @ 2006-08-01 19:03 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-ide

On Wed, 2006-08-02 at 03:45 +0900, Tejun Heo wrote:
> Roger Oberholtzer wrote:
> > On Wed, 2006-08-02 at 00:33 +0900, Tejun Heo wrote:
> >> Roger Oberholtzer wrote:
> >>> Should hotplug work with Intel Corporation 82801GB/GR/GH (ICH7
> >>> Family) chipset? I am trying kernel 2.6.17.7
> 
> Ah.. I should have spotted this earlier.  2.6.17.7 doesn't contain 
> updated EH and doesn't support any of new features including 
> hot/warmplug.  Please try 2.6.18-rc3.

OK. But I think there are issues with 2.6.18 generally. But I can try it
to see if this makes this better.

> 
> >>> I have been trying the warmplug stuff. But I am not convinced it is 
> >>> acting as I expect. If I remove a disk and then do a scan, shouldn't
> >>> the disk entry go away?
> >> Eventually, yes.  Do you mind to send me the dmesg?
> > 
> > I have picked out the lines related to this. Some of the complaints at
> > the end are probably when I moved the disk. 
> 
> Yeap, those look pretty normal for the previous code.  :p
> 
> >>> I know about the problems with just removing a disk. But this is with
> >>> one that is not mounted. I just want to see if the disks are properly
> >>> sensed as coming and going. I am using the warmplug instructions on
> >>> your web site.
> >> There are some complications with piix PCS register (port 
> >> enable/disable) which always seems to have some problem.  If you can use 
> >> AHCI mode, it will be *much* better.
> > 
> > OK. How do I get it in ahci mode? I see that both the ata_piix and achi
> > drivers are loaded. This is what is loaded:
> 
> Plain ICH7 doesn't support ahci. ICH7R supports ahci mode and usually 
> configurable in the BIOS menu.  On my board (P5LD2), it's in the first 
> page (the left-most one where the clock setting is and hard disks are 
> enumerated), it's called IDE configuration or something.

I will look. I have a SuperMicro motherboard.

> >> If you think the driver doesn't do the right thing(tm), please send me 
> >> detailed info.  I'll try to fix the problem if possible or explain why 
> >> it can't be fixed at the very least.
> > 
> > I bet the driver does the right thing. The trick is knowing what that is
> > supposed to be. And how to use the various commands on files in /sys at
> > the correct time and in the correct order.
> 
> Really, it's not that complicated.

Once you know what it is you need to do.

--
Roger Oberholtzer


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

* Re: libata question
  2006-08-01 19:03       ` Roger Oberholtzer
@ 2006-08-01 19:06         ` Tejun Heo
  2006-08-02  7:05           ` Roger Oberholtzer
  0 siblings, 1 reply; 16+ messages in thread
From: Tejun Heo @ 2006-08-01 19:06 UTC (permalink / raw)
  To: roger; +Cc: linux-ide

Roger Oberholtzer wrote:
> On Wed, 2006-08-02 at 03:45 +0900, Tejun Heo wrote:
>> Roger Oberholtzer wrote:
>>> On Wed, 2006-08-02 at 00:33 +0900, Tejun Heo wrote:
>>>> Roger Oberholtzer wrote:
>>>>> Should hotplug work with Intel Corporation 82801GB/GR/GH (ICH7
>>>>> Family) chipset? I am trying kernel 2.6.17.7
>> Ah.. I should have spotted this earlier.  2.6.17.7 doesn't contain 
>> updated EH and doesn't support any of new features including 
>> hot/warmplug.  Please try 2.6.18-rc3.
> 
> OK. But I think there are issues with 2.6.18 generally. But I can try it
> to see if this makes this better.

If you're uncomfortable with -rcX, you can try libata-tj-stable patch. 
It contains most of new stuff.

http://home-tj.org/files/libata-tj-stable/libata-tj-2.6.17.4-20060710.tar.bz2

>>> I bet the driver does the right thing. The trick is knowing what that is
>>> supposed to be. And how to use the various commands on files in /sys at
>>> the correct time and in the correct order.
>> Really, it's not that complicated.
> 
> Once you know what it is you need to do.

I tried hard to make things just work.  If you find things unnecessarily 
complicated, please let me know.

Good luck.

-- 
tejun

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

* 31244 PCI Card
  2006-08-01 15:18 libata question Roger Oberholtzer
  2006-08-01 15:33 ` Tejun Heo
@ 2006-08-02  1:22 ` sam song
  1 sibling, 0 replies; 16+ messages in thread
From: sam song @ 2006-08-02  1:22 UTC (permalink / raw)
  To: linux-ide

Hello,

Does anyone know the info of Intel GD31244 PCI/X SATA card? I searched with
Google but no luck. I mean to test it on PowerPC 74xx platform for my
customized design. Is GD31244 suitable?

TIA,

Sam


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

* Re: libata question
  2006-08-01 19:06         ` Tejun Heo
@ 2006-08-02  7:05           ` Roger Oberholtzer
  2006-08-02  7:20             ` Tejun Heo
  0 siblings, 1 reply; 16+ messages in thread
From: Roger Oberholtzer @ 2006-08-02  7:05 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-ide

On Wed, 2006-08-02 at 04:06 +0900, Tejun Heo wrote: 
> Roger Oberholtzer wrote:
> > On Wed, 2006-08-02 at 03:45 +0900, Tejun Heo wrote:
> >> Roger Oberholtzer wrote:
> >>> On Wed, 2006-08-02 at 00:33 +0900, Tejun Heo wrote:
> >>>> Roger Oberholtzer wrote:
> >>>>> Should hotplug work with Intel Corporation 82801GB/GR/GH (ICH7
> >>>>> Family) chipset? I am trying kernel 2.6.17.7
> >> Ah.. I should have spotted this earlier.  2.6.17.7 doesn't contain 
> >> updated EH and doesn't support any of new features including 
> >> hot/warmplug.  Please try 2.6.18-rc3.
> > 
> > OK. But I think there are issues with 2.6.18 generally. But I can try it
> > to see if this makes this better.
> 
> If you're uncomfortable with -rcX, you can try libata-tj-stable patch. 
> It contains most of new stuff.
> 
> http://home-tj.org/files/libata-tj-stable/libata-tj-2.6.17.4-20060710.tar.bz2

Thanks for that. But it had no noticeable difference.

I looked in the bios on my system to see if I could set the SATA disks
to AHCI mode. I did not see anything like that. I could select to do a
manual config, in which case I could set things like LBA mode, 32-bit
I/O (which defaults to off). So if hots wap require AHCI mode, I seem to
be screwed. It is a phoenix bios for the supermicro computer.

Maybe I can try a different SATA card instead of the stuff on the
motherboard. What do you think is the best one re hots waping? Either
PCI or PCI-X.

> >>> I bet the driver does the right thing. The trick is knowing what that is
> >>> supposed to be. And how to use the various commands on files in /sys at
> >>> the correct time and in the correct order.
> >> Really, it's not that complicated.
> > 
> > Once you know what it is you need to do.
> 
> I tried hard to make things just work.  If you find things unnecessarily 
> complicated, please let me know.

I have a system with an IDE disk with the OS that is fixed. I also have
4 hot swappable SATA disk bays. My use will involve changing the SATA
disks to do an analysis of the data they contain. There will be 4 disks
in an analysis set. I need to make it easy for the user to insert and
remove disks. Rebooting each time is a bad alternative. So, if hot swap
does not work, I will have to get warm swap working. I think part of the
confusion I have is how to deal with disks that are mounted. So I need
to get the steps well defined and make those that require user
interaction as few as possible.

-- 
Roger Oberholtzer

OPQ Systems AB
Ramböll Sverige AB
Kapellgränd 7
P.O. Box 4205
SE-102 65 Stockholm, Sweden

Tel: Int +46 8-615 60 20
Fax: Int +46 8-31 42 23


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

* Re: libata question
  2006-08-02  7:05           ` Roger Oberholtzer
@ 2006-08-02  7:20             ` Tejun Heo
  2006-08-02  8:06               ` Roger Oberholtzer
  2006-08-02 14:35               ` Roger Oberholtzer
  0 siblings, 2 replies; 16+ messages in thread
From: Tejun Heo @ 2006-08-02  7:20 UTC (permalink / raw)
  To: Roger Oberholtzer; +Cc: linux-ide

Roger Oberholtzer wrote:
> On Wed, 2006-08-02 at 04:06 +0900, Tejun Heo wrote: 
>> Roger Oberholtzer wrote:
>>> On Wed, 2006-08-02 at 03:45 +0900, Tejun Heo wrote:
>>>> Roger Oberholtzer wrote:
>>>>> On Wed, 2006-08-02 at 00:33 +0900, Tejun Heo wrote:
>>>>>> Roger Oberholtzer wrote:
>>>>>>> Should hotplug work with Intel Corporation 82801GB/GR/GH (ICH7
>>>>>>> Family) chipset? I am trying kernel 2.6.17.7
>>>> Ah.. I should have spotted this earlier.  2.6.17.7 doesn't contain 
>>>> updated EH and doesn't support any of new features including 
>>>> hot/warmplug.  Please try 2.6.18-rc3.
>>> OK. But I think there are issues with 2.6.18 generally. But I can try it
>>> to see if this makes this better.
>> If you're uncomfortable with -rcX, you can try libata-tj-stable patch. 
>> It contains most of new stuff.
>>
>> http://home-tj.org/files/libata-tj-stable/libata-tj-2.6.17.4-20060710.tar.bz2
> 
> Thanks for that. But it had no noticeable difference.

Hmmm... That's weird. 'echo - - - > /sys/class/scsi_host/xxx.../scan' 
didn't do the right thing?  Care to post dmesg?

> I looked in the bios on my system to see if I could set the SATA disks
> to AHCI mode. I did not see anything like that. I could select to do a
> manual config, in which case I could set things like LBA mode, 32-bit
> I/O (which defaults to off). So if hots wap require AHCI mode, I seem to
> be screwed. It is a phoenix bios for the supermicro computer.

The chipset might not support ahci mode.

> Maybe I can try a different SATA card instead of the stuff on the
> motherboard. What do you think is the best one re hots waping? Either
> PCI or PCI-X.

I primarily use sil3112/4, sil3124/32 and ahci for development.  So 
those tend to have better support for EH/hotplug stuff.

>>>>> I bet the driver does the right thing. The trick is knowing what that is
>>>>> supposed to be. And how to use the various commands on files in /sys at
>>>>> the correct time and in the correct order.
>>>> Really, it's not that complicated.
>>> Once you know what it is you need to do.
>> I tried hard to make things just work.  If you find things unnecessarily 
>> complicated, please let me know.
> 
> I have a system with an IDE disk with the OS that is fixed. I also have
> 4 hot swappable SATA disk bays. My use will involve changing the SATA
> disks to do an analysis of the data they contain. There will be 4 disks
> in an analysis set. I need to make it easy for the user to insert and
> remove disks. Rebooting each time is a bad alternative. So, if hot swap
> does not work, I will have to get warm swap working. I think part of the
> confusion I have is how to deal with disks that are mounted. So I need
> to get the steps well defined and make those that require user
> interaction as few as possible.

As far as libata is concerned, for warmplug, all you need to use are

   echo 1 > /sys/class/scsi_device/xxxx/device/delete

for removal, and for plugging

   echo - - - > /sys/class/scsi_host/xxxxx/scan

If you remove device before unmounting, the mounted fs will suffer from 
io errors and probably spit quite some error messages, so unmounting 
before is a good idea.

In general, ata_piix doesn't respond very well to runtime device 
addition mainly due to problems with port enable.  So, if you boot with 
empty slot and put new device in there and issue scan, it might or might 
not work, but ports which had a device attached on boot seem to always work.

On any 2.6.17 kernel, without new EH, none of hot/warm plugging works. 
Please double check you have the correct kernel.  Kernel messages are 
very different.

-- 
tejun

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

* Re: libata question
  2006-08-02  7:20             ` Tejun Heo
@ 2006-08-02  8:06               ` Roger Oberholtzer
  2006-08-02 14:35               ` Roger Oberholtzer
  1 sibling, 0 replies; 16+ messages in thread
From: Roger Oberholtzer @ 2006-08-02  8:06 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-ide

On Wed, 2006-08-02 at 16:20 +0900, Tejun Heo wrote:
> Roger Oberholtzer wrote:
> > On Wed, 2006-08-02 at 04:06 +0900, Tejun Heo wrote: 
> >> Roger Oberholtzer wrote:
> >>> On Wed, 2006-08-02 at 03:45 +0900, Tejun Heo wrote:
> >>>> Roger Oberholtzer wrote:
> >>>>> On Wed, 2006-08-02 at 00:33 +0900, Tejun Heo wrote:
> >>>>>> Roger Oberholtzer wrote:
> >>>>>>> Should hotplug work with Intel Corporation 82801GB/GR/GH (ICH7
> >>>>>>> Family) chipset? I am trying kernel 2.6.17.7
> >>>> Ah.. I should have spotted this earlier.  2.6.17.7 doesn't contain 
> >>>> updated EH and doesn't support any of new features including 
> >>>> hot/warmplug.  Please try 2.6.18-rc3.
> >>> OK. But I think there are issues with 2.6.18 generally. But I can try it
> >>> to see if this makes this better.
> >> If you're uncomfortable with -rcX, you can try libata-tj-stable patch. 
> >> It contains most of new stuff.
> >>
> >> http://home-tj.org/files/libata-tj-stable/libata-tj-2.6.17.4-20060710.tar.bz2
> > 
> > Thanks for that. But it had no noticeable difference.
> 
> Hmmm... That's weird. 'echo - - - > /sys/class/scsi_host/xxx.../scan' 
> didn't do the right thing?  Care to post dmesg?

I thought maybe the detection of removal and insertion would work. I did
not try the /sys stuff. I will look into that. I guess I can have them
be sure there is a disk in each bay when the system is powered up. I
will see if this hardware requires this.

> > I looked in the bios on my system to see if I could set the SATA disks
> > to AHCI mode. I did not see anything like that. I could select to do a
> > manual config, in which case I could set things like LBA mode, 32-bit
> > I/O (which defaults to off). So if hots wap require AHCI mode, I seem to
> > be screwed. It is a phoenix bios for the supermicro computer.
> 
> The chipset might not support ahci mode.
> 
> > Maybe I can try a different SATA card instead of the stuff on the
> > motherboard. What do you think is the best one re hots waping? Either
> > PCI or PCI-X.
> 
> I primarily use sil3112/4, sil3124/32 and ahci for development.  So 
> those tend to have better support for EH/hotplug stuff.
> 
> >>>>> I bet the driver does the right thing. The trick is knowing what that is
> >>>>> supposed to be. And how to use the various commands on files in /sys at
> >>>>> the correct time and in the correct order.
> >>>> Really, it's not that complicated.
> >>> Once you know what it is you need to do.
> >> I tried hard to make things just work.  If you find things unnecessarily 
> >> complicated, please let me know.
> > 
> > I have a system with an IDE disk with the OS that is fixed. I also have
> > 4 hot swappable SATA disk bays. My use will involve changing the SATA
> > disks to do an analysis of the data they contain. There will be 4 disks
> > in an analysis set. I need to make it easy for the user to insert and
> > remove disks. Rebooting each time is a bad alternative. So, if hot swap
> > does not work, I will have to get warm swap working. I think part of the
> > confusion I have is how to deal with disks that are mounted. So I need
> > to get the steps well defined and make those that require user
> > interaction as few as possible.
> 
> As far as libata is concerned, for warmplug, all you need to use are
> 
>    echo 1 > /sys/class/scsi_device/xxxx/device/delete
> 
> for removal, and for plugging
> 
>    echo - - - > /sys/class/scsi_host/xxxxx/scan
> 
> If you remove device before unmounting, the mounted fs will suffer from 
> io errors and probably spit quite some error messages, so unmounting 
> before is a good idea.
> 
> In general, ata_piix doesn't respond very well to runtime device 
> addition mainly due to problems with port enable.  So, if you boot with 
> empty slot and put new device in there and issue scan, it might or might 
> not work, but ports which had a device attached on boot seem to always work.
> 
> On any 2.6.17 kernel, without new EH, none of hot/warm plugging works. 
> Please double check you have the correct kernel.  Kernel messages are 
> very different.

It is 2.6.17.7 (current stable from kernel.org), with your suggested
patches.

-- 
Roger Oberholtzer

OPQ Systems AB
Ramböll Sverige AB
Kapellgränd 7
P.O. Box 4205
SE-102 65 Stockholm, Sweden

Tel: Int +46 8-615 60 20
Fax: Int +46 8-31 42 23


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

* Re: libata question
  2006-08-02  7:20             ` Tejun Heo
  2006-08-02  8:06               ` Roger Oberholtzer
@ 2006-08-02 14:35               ` Roger Oberholtzer
  2006-08-02 15:02                 ` Tejun Heo
  1 sibling, 1 reply; 16+ messages in thread
From: Roger Oberholtzer @ 2006-08-02 14:35 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-ide

On Wed, 2006-08-02 at 16:20 +0900, Tejun Heo wrote:
> Roger Oberholtzer wrote:
> > On Wed, 2006-08-02 at 04:06 +0900, Tejun Heo wrote: 
> >> Roger Oberholtzer wrote:
> >>> On Wed, 2006-08-02 at 03:45 +0900, Tejun Heo wrote:
> >>>> Roger Oberholtzer wrote:
> >>>>> On Wed, 2006-08-02 at 00:33 +0900, Tejun Heo wrote:
> >>>>>> Roger Oberholtzer wrote:
> >>>>>>> Should hotplug work with Intel Corporation 82801GB/GR/GH (ICH7
> >>>>>>> Family) chipset? I am trying kernel 2.6.17.7
> >>>> Ah.. I should have spotted this earlier.  2.6.17.7 doesn't contain 
> >>>> updated EH and doesn't support any of new features including 
> >>>> hot/warmplug.  Please try 2.6.18-rc3.
> >>> OK. But I think there are issues with 2.6.18 generally. But I can try it
> >>> to see if this makes this better.
> >> If you're uncomfortable with -rcX, you can try libata-tj-stable patch. 
> >> It contains most of new stuff.
> >>
> >> http://home-tj.org/files/libata-tj-stable/libata-tj-2.6.17.4-20060710.tar.bz2
> > 
> > Thanks for that. But it had no noticeable difference.
> 
> Hmmm... That's weird. 'echo - - - > /sys/class/scsi_host/xxx.../scan' 
> didn't do the right thing?  Care to post dmesg?
> 
> > I looked in the bios on my system to see if I could set the SATA disks
> > to AHCI mode. I did not see anything like that. I could select to do a
> > manual config, in which case I could set things like LBA mode, 32-bit
> > I/O (which defaults to off). So if hots wap require AHCI mode, I seem to
> > be screwed. It is a phoenix bios for the supermicro computer.
> 
> The chipset might not support ahci mode.
> 
> > Maybe I can try a different SATA card instead of the stuff on the
> > motherboard. What do you think is the best one re hots waping? Either
> > PCI or PCI-X.
> 
> I primarily use sil3112/4, sil3124/32 and ahci for development.  So 
> those tend to have better support for EH/hotplug stuff.
> 
> >>>>> I bet the driver does the right thing. The trick is knowing what that is
> >>>>> supposed to be. And how to use the various commands on files in /sys at
> >>>>> the correct time and in the correct order.
> >>>> Really, it's not that complicated.
> >>> Once you know what it is you need to do.
> >> I tried hard to make things just work.  If you find things unnecessarily 
> >> complicated, please let me know.
> > 
> > I have a system with an IDE disk with the OS that is fixed. I also have
> > 4 hot swappable SATA disk bays. My use will involve changing the SATA
> > disks to do an analysis of the data they contain. There will be 4 disks
> > in an analysis set. I need to make it easy for the user to insert and
> > remove disks. Rebooting each time is a bad alternative. So, if hot swap
> > does not work, I will have to get warm swap working. I think part of the
> > confusion I have is how to deal with disks that are mounted. So I need
> > to get the steps well defined and make those that require user
> > interaction as few as possible.
> 
> As far as libata is concerned, for warmplug, all you need to use are
> 
>    echo 1 > /sys/class/scsi_device/xxxx/device/delete
> 
> for removal, and for plugging
> 
>    echo - - - > /sys/class/scsi_host/xxxxx/scan
> 
> If you remove device before unmounting, the mounted fs will suffer from 
> io errors and probably spit quite some error messages, so unmounting 
> before is a good idea.

Can the removal echo be done after the disk is physically removed? I
expect not as this seems to confuse things. If this is the case, is
there any way to restore sanity without a reboot?

-- 
Roger Oberholtzer

OPQ Systems AB
Ramböll Sverige AB
Kapellgränd 7
P.O. Box 4205
SE-102 65 Stockholm, Sweden

Tel: Int +46 8-615 60 20
Fax: Int +46 8-31 42 23


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

* Re: libata question
  2006-08-02 14:35               ` Roger Oberholtzer
@ 2006-08-02 15:02                 ` Tejun Heo
  2006-08-03  7:26                   ` Roger Oberholtzer
  0 siblings, 1 reply; 16+ messages in thread
From: Tejun Heo @ 2006-08-02 15:02 UTC (permalink / raw)
  To: Roger Oberholtzer; +Cc: linux-ide

Roger Oberholtzer wrote:
> Can the removal echo be done after the disk is physically removed? I
> expect not as this seems to confuse things. If this is the case, is
> there any way to restore sanity without a reboot?

It shouldn't require a reboot under any circumstances.  Without dmesg 
and explanation of what you did, I cannot help you much.  What do you 
mean by sanity?  What makes you think libata lost sanity?  *Please* be 
more specific.

-- 
tejun

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

* Re: libata question
  2006-08-02 15:02                 ` Tejun Heo
@ 2006-08-03  7:26                   ` Roger Oberholtzer
  2006-08-03  7:58                     ` Tejun Heo
  0 siblings, 1 reply; 16+ messages in thread
From: Roger Oberholtzer @ 2006-08-03  7:26 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-ide


If I switch two disks around and do a scan, nothing changes. I need
to delete the disks and then scan to have the change noted. Is this
expected behavior?

Does this mean I must delete a disk with a command when it it removed?
This is problematic in that I do not know which disk may have been
removed!
The old /proc/scsi interface would allow you to update the idea of which
things are attached without knowing which they were and (key point)
without
messing up a device that is unchanged and mounted.

Is this possible with libata?

I know you want logs. But I really feel that if the intended use is
unclear,
I can waste lots of time here sending in logs when trying to do things
that the driver does not intend I do. Step 1 must surely be to tell the
driver's expectations/limits first.

If I remove or insert a disk, there is nothing at all added to the
kernel log. There only seems to be activity when I echo something to
a file in /sys.

If I remove disks (but run no commands on the computer) and then do a
scan, I get this in the log:

Aug  3 08:16:43 aies1 kernel: ata1.00: qc timeout (cmd 0xec)
Aug  3 08:16:43 aies1 kernel: ata1.00: failed to IDENTIFY (I/O error,
err_mask=0                           x4)
Aug  3 08:16:43 aies1 kernel: ata1.00: revalidation failed (errno=-5)
Aug  3 08:16:43 aies1 kernel: ata1: failed to recover some devices,
retrying in                            5 secs
Aug  3 08:16:45 aies1 kernel: ata2.00: qc timeout (cmd 0xec)
Aug  3 08:16:45 aies1 kernel: ata2.00: failed to IDENTIFY (I/O error,
err_mask=0                           x4)
Aug  3 08:16:45 aies1 kernel: ata2.00: revalidation failed (errno=-5)
Aug  3 08:16:45 aies1 kernel: ata2: failed to recover some devices,
retrying in                            5 secs
Aug  3 08:16:55 aies1 kernel: ata1: port is slow to respond, please be
patient
Aug  3 08:16:57 aies1 kernel: ata2: port is slow to respond, please be
patient
Aug  3 08:17:18 aies1 kernel: ata1: port failed to respond (30 secs)
Aug  3 08:17:18 aies1 kernel: ata1: soft resetting port
Aug  3 08:17:20 aies1 kernel: ata2: port failed to respond (30 secs)
Aug  3 08:17:20 aies1 kernel: ata2: soft resetting port
Aug  3 08:17:25 aies1 kernel: ata1: port is slow to respond, please be
patient
Aug  3 08:17:27 aies1 kernel: ata2: port is slow to respond, please be
patient
Aug  3 08:17:48 aies1 kernel: ata1: port failed to respond (30 secs)
Aug  3 08:17:48 aies1 kernel: ATA: abnormal status 0xD0 on port 0x30EF
Aug  3 08:17:48 aies1 kernel: ATA: abnormal status 0xD0 on port 0x30EF
Aug  3 08:17:48 aies1 kernel: ATA: abnormal status 0xD0 on port 0x30EF
Aug  3 08:17:48 aies1 kernel: ATA: abnormal status 0xD0 on port 0x30EF


-- 
Roger Oberholtzer

OPQ Systems AB
Ramböll Sverige AB
Kapellgränd 7
P.O. Box 4205
SE-102 65 Stockholm, Sweden

Tel: Int +46 8-615 60 20
Fax: Int +46 8-31 42 23


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

* Re: libata question
  2006-08-03  7:26                   ` Roger Oberholtzer
@ 2006-08-03  7:58                     ` Tejun Heo
  2006-08-03  8:49                       ` Roger Oberholtzer
  0 siblings, 1 reply; 16+ messages in thread
From: Tejun Heo @ 2006-08-03  7:58 UTC (permalink / raw)
  To: Roger Oberholtzer; +Cc: linux-ide

Roger Oberholtzer wrote:
> If I switch two disks around and do a scan, nothing changes. I need
> to delete the disks and then scan to have the change noted. Is this
> expected behavior?

No, issuing scan makes libata reset the channel and revalidate all 
attached devices.  Swap as you want and issue scan to all controllers 
should always do the job as long as hardware is okay with it.

> Does this mean I must delete a disk with a command when it it removed?
> This is problematic in that I do not know which disk may have been
> removed!
> The old /proc/scsi interface would allow you to update the idea of which
> things are attached without knowing which they were and (key point)
> without
> messing up a device that is unchanged and mounted.
> 
> Is this possible with libata?

Yes, just issue scan to all suspected interfaces.

> I know you want logs. But I really feel that if the intended use is
> unclear,
> I can waste lots of time here sending in logs when trying to do things
> that the driver does not intend I do. Step 1 must surely be to tell the
> driver's expectations/limits first.

To me, surplus info is always better than insufficient info.  I can 
filter libata messages pretty well and explain it to you.  Trust me.

> If I remove or insert a disk, there is nothing at all added to the
> kernel log. There only seems to be activity when I echo something to
> a file in /sys.

Hardware limitation of ata_piix.  PHY registers are inaccessible and 
there's no phy status changed interrupt.

> If I remove disks (but run no commands on the computer) and then do a
> scan, I get this in the log:
> 
> Aug  3 08:16:43 aies1 kernel: ata1.00: qc timeout (cmd 0xec)
> Aug  3 08:16:43 aies1 kernel: ata1.00: failed to IDENTIFY (I/O error,
> err_mask=0                           x4)
> Aug  3 08:16:43 aies1 kernel: ata1.00: revalidation failed (errno=-5)
> Aug  3 08:16:43 aies1 kernel: ata1: failed to recover some devices,
> retrying in                            5 secs
> Aug  3 08:16:45 aies1 kernel: ata2.00: qc timeout (cmd 0xec)
> Aug  3 08:16:45 aies1 kernel: ata2.00: failed to IDENTIFY (I/O error,
> err_mask=0                           x4)
> Aug  3 08:16:45 aies1 kernel: ata2.00: revalidation failed (errno=-5)
> Aug  3 08:16:45 aies1 kernel: ata2: failed to recover some devices,
> retrying in                            5 secs
> Aug  3 08:16:55 aies1 kernel: ata1: port is slow to respond, please be
> patient
> Aug  3 08:16:57 aies1 kernel: ata2: port is slow to respond, please be
> patient
> Aug  3 08:17:18 aies1 kernel: ata1: port failed to respond (30 secs)
> Aug  3 08:17:18 aies1 kernel: ata1: soft resetting port
> Aug  3 08:17:20 aies1 kernel: ata2: port failed to respond (30 secs)
> Aug  3 08:17:20 aies1 kernel: ata2: soft resetting port
> Aug  3 08:17:25 aies1 kernel: ata1: port is slow to respond, please be
> patient
> Aug  3 08:17:27 aies1 kernel: ata2: port is slow to respond, please be
> patient
> Aug  3 08:17:48 aies1 kernel: ata1: port failed to respond (30 secs)

For both ata1 and ata2, libata is trying to scan the channels by

1. issuing reset
2. revalidate existing devices, if they fail remove.
3. discover new devices

ata_piix doesn't provide phy status regs, so libata cannot know whether 
device is attached to the port or not.  libata does traditional device 
detection by writing and reading back certain TF regs but in most SATA 
controllers this method results in false positive.  During boot, BIOS 
marks which ports are occupied, so this doesn't really matter.

So, libata assumes device is attached to the port and issues reset.  Of 
course, device isn't there so it times out.  After several tries (which 
can take a few minutes), libata will give up and disable the devices and 
ports.  If you connect device to the ports and issue scan, libata will 
retry and discover new devices.  Or, just replace disks and issue scan, 
libata will know that devices have changed immediately and detach old 
ones and attach new ones.

The problem is that ata_piix can't really do hotplug.  It can do 
warmplug with some help from user but if you don't tell it which device 
to remove precisely, it may need quite some timeouts and retries as 
you've seen.

I don't know your usage model but my recommendation is...

* If you're gonna do a lot of hotplugging, just get a sil3114 or 3124, 
they're cheap and hotplug works well on those controllers.

* If you're gonna stick with ata_piix, find a way to exactly find which 
device is removed or issue scan after attaching new device.

-- 
tejun

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

* Re: libata question
  2006-08-03  7:58                     ` Tejun Heo
@ 2006-08-03  8:49                       ` Roger Oberholtzer
  2006-08-03 20:08                         ` Stefan Smietanowski
  0 siblings, 1 reply; 16+ messages in thread
From: Roger Oberholtzer @ 2006-08-03  8:49 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-ide

On Thu, 2006-08-03 at 16:58 +0900, Tejun Heo wrote:

> I don't know your usage model but my recommendation is...
> 
> * If you're gonna do a lot of hotplugging, just get a sil3114 or 3124, 
> they're cheap and hotplug works well on those controllers.

I am considering this. Now to find who sells these in Sweden...

> 
> * If you're gonna stick with ata_piix, find a way to exactly find which 
> device is removed or issue scan after attaching new device.
> 
-- 
Roger Oberholtzer

OPQ Systems AB
Ramböll Sverige AB
Kapellgränd 7
P.O. Box 4205
SE-102 65 Stockholm, Sweden

Tel: Int +46 8-615 60 20
Fax: Int +46 8-31 42 23


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

* Re: libata question
  2006-08-03  8:49                       ` Roger Oberholtzer
@ 2006-08-03 20:08                         ` Stefan Smietanowski
  0 siblings, 0 replies; 16+ messages in thread
From: Stefan Smietanowski @ 2006-08-03 20:08 UTC (permalink / raw)
  To: Roger Oberholtzer; +Cc: Tejun Heo, linux-ide

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

Roger Oberholtzer wrote:
> On Thu, 2006-08-03 at 16:58 +0900, Tejun Heo wrote:
> 
> 
>>I don't know your usage model but my recommendation is...
>>
>>* If you're gonna do a lot of hotplugging, just get a sil3114 or 3124, 
>>they're cheap and hotplug works well on those controllers.
> 
> 
> I am considering this. Now to find who sells these in Sweden...

http://www.ggsdata.se/PC/stlaba223.html

// Stefan

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 251 bytes --]

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

end of thread, other threads:[~2006-08-03 20:09 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-01 15:18 libata question Roger Oberholtzer
2006-08-01 15:33 ` Tejun Heo
2006-08-01 18:39   ` Roger Oberholtzer
2006-08-01 18:45     ` Tejun Heo
2006-08-01 19:03       ` Roger Oberholtzer
2006-08-01 19:06         ` Tejun Heo
2006-08-02  7:05           ` Roger Oberholtzer
2006-08-02  7:20             ` Tejun Heo
2006-08-02  8:06               ` Roger Oberholtzer
2006-08-02 14:35               ` Roger Oberholtzer
2006-08-02 15:02                 ` Tejun Heo
2006-08-03  7:26                   ` Roger Oberholtzer
2006-08-03  7:58                     ` Tejun Heo
2006-08-03  8:49                       ` Roger Oberholtzer
2006-08-03 20:08                         ` Stefan Smietanowski
2006-08-02  1:22 ` 31244 PCI Card sam song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).