Re: libata /dev/scd0 problem: mount after burn fails without eject

2007-05-04 Thread Tejun Heo
Michal Piotrowski wrote:
> On 01/05/07, Mark Lord <[EMAIL PROTECTED]> wrote:
>> Forwarding to linux-scsi and linux-ide mailing lists.
>>
>> Frank van Maarseveen wrote:
>> > Tested on 2.6.20.6 and 2.6.21.1
>> >
>> > I decided to swich from the old IDE drivers to libata and now there
>> > seems to be a little but annoying problem: cannot mount an ISO image
>> > after burning it.
>> >
>> > May  1 14:32:55 kernel: attempt to access beyond end of device
>> > May  1 14:32:55 kernel: sr0: rw=0, want=68, limit=4
>> > May  1 14:32:55 kernel: isofs_fill_super: bread failed, dev=sr0,
>> iso_blknum=16, block=16
>> >
>> > an "eject" command seems to fix the state of the PATA DVD writer
>> > or driver. The problem occurs for burning a CD and for DVD too with
>> > identical error messages.

Right after burning, if you run 'fuser -v /dev/sr0', what does it say?

-- 
tejun
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: VIA VT6420 SATA suspend/resume problem in 2.6.20?

2007-05-04 Thread Jeroen Janssen

Hi,

Attached is the output from dmesg. Let me know if you need anything
else to pinpoint the problem!

Best regards,

Jeroen Janssen

On 5/3/07, Tejun Heo <[EMAIL PROTECTED]> wrote:

Jeroen Janssen wrote:
> Hello,
>
> I have a board with a VIA 6420 chipset and a SATA harddisk running on
> 2.6.20 (Fedora Core 6).
>
> When I suspend the system, it goes to sleep instantly, but when I
> wakeup the system, it takes about 2 x 30 seconds for the SATA disk to
> be accessable again.
>
> I searched the mailinglist and could not really find if this is a
> known problem (although I noticed that there's some work going on in
> the acpi power management).
>
> Does anyone if this is a known problem? (and if so, is there a
> solution available?)
> How can I pinpoint the exact problem?
>
> If you need any specific logging, just let me know and I'll provide them.

The result of dmesg after resume would be nice.

--
tejun



dmesg.log
Description: Binary data


Re: libata /dev/scd0 problem: mount after burn fails without eject

2007-05-04 Thread Tejun Heo
Frank van Maarseveen wrote:
> On Fri, May 04, 2007 at 10:16:32AM +0200, Tejun Heo wrote:
>> Michal Piotrowski wrote:
>>> On 01/05/07, Mark Lord <[EMAIL PROTECTED]> wrote:
 Forwarding to linux-scsi and linux-ide mailing lists.

 Frank van Maarseveen wrote:
> Tested on 2.6.20.6 and 2.6.21.1
>
> I decided to swich from the old IDE drivers to libata and now there
> seems to be a little but annoying problem: cannot mount an ISO image
> after burning it.
>
> May  1 14:32:55 kernel: attempt to access beyond end of device
> May  1 14:32:55 kernel: sr0: rw=0, want=68, limit=4
> May  1 14:32:55 kernel: isofs_fill_super: bread failed, dev=sr0,
 iso_blknum=16, block=16
> an "eject" command seems to fix the state of the PATA DVD writer
> or driver. The problem occurs for burning a CD and for DVD too with
> identical error messages.
>> Right after burning, if you run 'fuser -v /dev/sr0', what does it say?
> 
> Tried the fuser as root to be sure but it didn't show anything.

I guess sr is forgetting to set media changed flag somewhere.  Don't
really know where tho.  CC'd Bartlomiej, linux-scsi and linux-ide.  Any
ideas?

-- 
tejun
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: libata /dev/scd0 problem: mount after burn fails without eject

2007-05-04 Thread Frank van Maarseveen
On Fri, May 04, 2007 at 10:41:41AM +0200, Tejun Heo wrote:
> Frank van Maarseveen wrote:
> > On Fri, May 04, 2007 at 10:16:32AM +0200, Tejun Heo wrote:
> >> Michal Piotrowski wrote:
> >>> On 01/05/07, Mark Lord <[EMAIL PROTECTED]> wrote:
>  Forwarding to linux-scsi and linux-ide mailing lists.
> 
>  Frank van Maarseveen wrote:
> > Tested on 2.6.20.6 and 2.6.21.1
> >
> > I decided to swich from the old IDE drivers to libata and now there
> > seems to be a little but annoying problem: cannot mount an ISO image
> > after burning it.
> >
> > May  1 14:32:55 kernel: attempt to access beyond end of device
> > May  1 14:32:55 kernel: sr0: rw=0, want=68, limit=4
> > May  1 14:32:55 kernel: isofs_fill_super: bread failed, dev=sr0,
>  iso_blknum=16, block=16
> > an "eject" command seems to fix the state of the PATA DVD writer
> > or driver. The problem occurs for burning a CD and for DVD too with
> > identical error messages.
> >> Right after burning, if you run 'fuser -v /dev/sr0', what does it say?
> > 
> > Tried the fuser as root to be sure but it didn't show anything.
> 
> I guess sr is forgetting to set media changed flag somewhere.

Plausible. I get the same kernel messages when I try to mount the CD
before burning.

-- 
Frank
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sata_via: add missing PM hooks

2007-05-04 Thread Tejun Heo
For some reason, sata_via is missing PM hooks.  Add them.

Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>
---
This patch is against 2.6.21 but you can use it over 2.6.20 too.  Does
this fix your problem?

Index: tree0/drivers/ata/sata_via.c
===
--- tree0.orig/drivers/ata/sata_via.c
+++ tree0/drivers/ata/sata_via.c
@@ -97,6 +97,10 @@ static struct pci_driver svia_pci_driver
.name   = DRV_NAME,
.id_table   = svia_pci_tbl,
.probe  = svia_init_one,
+#ifdef CONFIG_PM
+   .suspend= ata_pci_device_suspend,
+   .resume = ata_pci_device_resume,
+#endif
.remove = ata_pci_remove_one,
 };
 
@@ -116,6 +120,10 @@ static struct scsi_host_template svia_sh
.slave_configure= ata_scsi_slave_config,
.slave_destroy  = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param,
+#ifdef CONFIG_PM
+   .suspend= ata_scsi_device_suspend,
+   .resume = ata_scsi_device_resume,
+#endif
 };
 
 static const struct ata_port_operations vt6420_sata_ops = {
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Data corruption with sata_sil (Sil 3112)

2007-05-04 Thread Simon Kirby
Hello,

I've been having problems with Sil 3112 cards I purchased for additional
SATA ports resulting in read data corruption, about 3-5 instances over
2 GB of data, 100% reproducible.

I tried fiddling with PCI latency timer, underclocking, all sorts of
stuff, all no help.

I just rebuilt the entire box with the remains of another (went from
A7V8X (VIA) to A7N8X (NVidia), new CPU, new RAM, new power supply),
thinking the problem was related to the motherboard.  The issue followed
to the new box.

This new motherboard has an onboard Sil 3112 as well.  The old onboard
was VIA SATA, which did not corrupt anything.  The Sil 3112 onboard now
does too.

I noticed the driver has a request-limit quirk.  I tried forcing this on
-- same results.  I noticed there is a DMA-limiting quirk -- forced on,
same result.

I can't seem to find a way to make this chipset not corrupt reads.

Am I alone?

Scipt used to md5sum to find corruption:

find $* -type f -print0 | sort -z | xargs -0 md5sum

Reproduced on any recent 2.6 kernel version (2.6.18 - 2.6.21).

Simon-
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: libata /dev/scd0 problem: mount after burn fails without eject

2007-05-04 Thread Frank van Maarseveen
On Fri, May 04, 2007 at 10:16:32AM +0200, Tejun Heo wrote:
> Michal Piotrowski wrote:
> > On 01/05/07, Mark Lord <[EMAIL PROTECTED]> wrote:
> >> Forwarding to linux-scsi and linux-ide mailing lists.
> >>
> >> Frank van Maarseveen wrote:
> >> > Tested on 2.6.20.6 and 2.6.21.1
> >> >
> >> > I decided to swich from the old IDE drivers to libata and now there
> >> > seems to be a little but annoying problem: cannot mount an ISO image
> >> > after burning it.
> >> >
> >> > May  1 14:32:55 kernel: attempt to access beyond end of device
> >> > May  1 14:32:55 kernel: sr0: rw=0, want=68, limit=4
> >> > May  1 14:32:55 kernel: isofs_fill_super: bread failed, dev=sr0,
> >> iso_blknum=16, block=16
> >> >
> >> > an "eject" command seems to fix the state of the PATA DVD writer
> >> > or driver. The problem occurs for burning a CD and for DVD too with
> >> > identical error messages.
> 
> Right after burning, if you run 'fuser -v /dev/sr0', what does it say?

Tried the fuser as root to be sure but it didn't show anything.

-- 
Frank
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: SATA SB600 works in 2.6.20.4 but not in 2.6.21-rc5 with irqpoll parameter

2007-05-04 Thread Tejun Heo
Matí­as Alejandro Torres wrote:
> CORRECTION:
> 
> I tried with the irqpoll parameter (used in the right way) and the sata
> disk is detected but lots of "unexpected IRQ trap at vector a0" are
> displayed. When the pci=nomsi flag is set, no warning/error is shown and
> the SATA disk is detected properly.
> 
> 
> This is for kernel version 2.6.17, I must be falling asleep.

Matias, are you still there?  If so, can you please test the attached
patch and see whether it fixes your problem - ie. boots okay without
'pci=nomsi'?

-- 
tejun
Index: tree0/drivers/pci/quirks.c
===
--- tree0.orig/drivers/pci/quirks.c
+++ tree0/drivers/pci/quirks.c
@@ -1761,6 +1761,7 @@ static void __devinit quirk_disable_msi(
}
 }
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, 
quirk_disable_msi);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x5a3f, quirk_disable_msi); /* 
RS480 PCI bridge */
 
 /* Go through the list of Hypertransport capabilities and
  * return 1 if a HT MSI capability is found and enabled */


Re: [PATCH] sata_via: add missing PM hooks

2007-05-04 Thread Jeroen Janssen

Hi,

Thanks very much! This indeed solved the problem.
Anything I can to help get it included in the next kernel release?

Best regards,

Jeroen Janssen

On 5/4/07, Tejun Heo <[EMAIL PROTECTED]> wrote:

For some reason, sata_via is missing PM hooks.  Add them.

Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>
---
This patch is against 2.6.21 but you can use it over 2.6.20 too.  Does
this fix your problem?

Index: tree0/drivers/ata/sata_via.c
===
--- tree0.orig/drivers/ata/sata_via.c
+++ tree0/drivers/ata/sata_via.c
@@ -97,6 +97,10 @@ static struct pci_driver svia_pci_driver
.name   = DRV_NAME,
.id_table   = svia_pci_tbl,
.probe  = svia_init_one,
+#ifdef CONFIG_PM
+   .suspend= ata_pci_device_suspend,
+   .resume = ata_pci_device_resume,
+#endif
.remove = ata_pci_remove_one,
 };

@@ -116,6 +120,10 @@ static struct scsi_host_template svia_sh
.slave_configure= ata_scsi_slave_config,
.slave_destroy  = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param,
+#ifdef CONFIG_PM
+   .suspend= ata_scsi_device_suspend,
+   .resume = ata_scsi_device_resume,
+#endif
 };

 static const struct ata_port_operations vt6420_sata_ops = {


-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] sata_via: add missing PM hooks

2007-05-04 Thread Tejun Heo
Jeroen Janssen wrote:
> Hi,
> 
> Thanks very much! This indeed solved the problem.
> Anything I can to help get it included in the next kernel release?

Well, the mystery here is how this bit was missing so there should be no
problem including it in the next release.  I'll forward it to -stable
team too.  It's also a bit amusing to see libata EH actually recovers
from suspend without explicit resuming.  :-)

Thanks.

-- 
tejun
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] sata_via: add missing PM hooks

2007-05-04 Thread Tejun Heo
For some reason, sata_via is missing PM hooks.  Add them.  Spotted by
Jeroen Janssen <[EMAIL PROTECTED]>.

Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>
Cc: Jeroen Janssen <[EMAIL PROTECTED]>
---
I have no idea how we missed this.  This is for both libata-dev &&
-stable.  Thanks.

Index: tree0/drivers/ata/sata_via.c
===
--- tree0.orig/drivers/ata/sata_via.c
+++ tree0/drivers/ata/sata_via.c
@@ -97,6 +97,10 @@ static struct pci_driver svia_pci_driver
.name   = DRV_NAME,
.id_table   = svia_pci_tbl,
.probe  = svia_init_one,
+#ifdef CONFIG_PM
+   .suspend= ata_pci_device_suspend,
+   .resume = ata_pci_device_resume,
+#endif
.remove = ata_pci_remove_one,
 };
 
@@ -116,6 +120,10 @@ static struct scsi_host_template svia_sh
.slave_configure= ata_scsi_slave_config,
.slave_destroy  = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param,
+#ifdef CONFIG_PM
+   .suspend= ata_scsi_device_suspend,
+   .resume = ata_scsi_device_resume,
+#endif
 };
 
 static const struct ata_port_operations vt6420_sata_ops = {
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: SATA SB600 works in 2.6.20.4 but not in 2.6.21-rc5 with irqpoll parameter

2007-05-04 Thread Matí­as Alejandro Torres

Tejun Heo escribió:

Matí­as Alejandro Torres wrote:
  

CORRECTION:

I tried with the irqpoll parameter (used in the right way) and the sata
disk is detected but lots of "unexpected IRQ trap at vector a0" are
displayed. When the pci=nomsi flag is set, no warning/error is shown and
the SATA disk is detected properly.


This is for kernel version 2.6.17, I must be falling asleep.



Matias, are you still there?  If so, can you please test the attached
patch and see whether it fixes your problem - ie. boots okay without
'pci=nomsi'?

  



Index: tree0/drivers/pci/quirks.c
===
--- tree0.orig/drivers/pci/quirks.c
+++ tree0/drivers/pci/quirks.c
@@ -1761,6 +1761,7 @@ static void __devinit quirk_disable_msi(
}
 }
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, 
quirk_disable_msi);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x5a3f, quirk_disable_msi); /* 
RS480 PCI bridge */
 
 /* Go through the list of Hypertransport capabilities and

  * return 1 if a HT MSI capability is found and enabled */
  
Okey, I'll try the patch and let you know how it goes. I'm sorry for not 
having test it but I'm been studing a lot these last few days. Tonight 
I'll test it. Thanks!

-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[FW ide-cs] Re: jvc cdrom drive

2007-05-04 Thread Komuro
On Thu, 03 May 2007 15:29:19 +0100
Richard Kennedy <[EMAIL PROTECTED]> wrote:


IDE bugs should be posted to the linux-ide mailing list.


> Hi all, 
> I have a JVC MP-CDX1 cdrom drive that came with my laptop which used to
> work with ide-cs but stopped working with newer kernels.
> 
> I added its ident to ide-cs.c (see patch below) and the drive now is
> detected and gets mounted when plugged in and seems to work correctly.
> 
> But when I eject the card, pccardctl eject 0, the laptop locks up
> completely, there are no messages in the log, and the fan goes to full
> speed so I guess the cpu is running at 100%.
> Any ideas what's going wrong or how to debug it ? 
> Is there anything else I need to patch to get this working ?
> 
> Thanks
> Richard
> 
> card info :- 
> 
> PRODID_1="KME"
> PRODID_2="KXLC005"
> PRODID_3="00"
> PRODID_4=""
> MANFID=0032,2904
> FUNCID=8
> 
> log messages on insert :- 
> 
> May  3 11:22:52 mininote kernel: pccard: PCMCIA card inserted into slot 0
> May  3 11:22:52 mininote kernel: cs: memory probe 0xa000-0xa0ff: 
> clean.
> May  3 11:22:52 mininote kernel: pcmcia: registering new device pcmcia0.0
> May  3 11:22:53 mininote kernel: hdc: UJDB130, ATAPI CD/DVD-ROM drive
> May  3 11:22:53 mininote kernel: ide1 at 0x190-0x197,0x396 on irq 3
> May  3 11:22:53 mininote kernel: ide-cs: hdc: Vpp = 0.0
> May  3 11:22:54 mininote kernel: hdc: ATAPI 20X CD-ROM drive, 128kB Cache
> May  3 11:22:54 mininote kernel: Uniform CD-ROM driver Revision: 3.20
> May  3 11:23:04 mininote hald: mounted /dev/hdc on behalf of uid 500
> May  3 11:23:34 mininote hald: unmounted /dev/hdc from '/media/FC_4 i386 ftp 
> #1' on behalf of uid 500
> May  3 11:24:17 mininote kernel: pccard: card ejected from slot 0
> << lockup happened here >>
> 
> patch
> --- linux-2.6.21.1/drivers/ide/legacy/ide-cs.c.orig   2007-05-02 
> 12:09:57.0 +0100
> +++ linux-2.6.21.1/drivers/ide/legacy/ide-cs.c2007-05-02 
> 12:12:40.0 +0100
> @@ -362,6 +362,7 @@
>   PCMCIA_DEVICE_MANF_CARD(0x000a, 0x),/* I-O Data CFA */
>   PCMCIA_DEVICE_MANF_CARD(0x001c, 0x0001),/* Mitsubishi CFA */
>   PCMCIA_DEVICE_MANF_CARD(0x0032, 0x0704),
> + PCMCIA_DEVICE_MANF_CARD(0x0032, 0x2904),/* KME KXLCOO5 JVC 
> MP-CDX1 */
>   PCMCIA_DEVICE_MANF_CARD(0x0045, 0x0401),/* SanDisk CFA */
>   PCMCIA_DEVICE_MANF_CARD(0x0098, 0x),/* Toshiba */
>   PCMCIA_DEVICE_MANF_CARD(0x00a4, 0x002d),
> 
>
> 

Best Regards
Komuro
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: 2.6.21-mm1: many processes end up in D state

2007-05-04 Thread Jiri Slaby
Cc: Mikael Pettersson <[EMAIL PROTECTED]>
Cc: linux-ide@vger.kernel.org
Cc: Jeff Garzik <[EMAIL PROTECTED]>

Jiri Slaby napsal(a):
> Cc: [EMAIL PROTECTED]
> 
> Jiri Slaby napsal(a):
>> Hi,
>>
>> I have a problem with higher disk loads (e.g. running git-log or yum update).
>> Many processes end up in D state and system is unusable -- I'm not able to 
>> run
>> anything but smooth mouse moving when this happens.
>>
>> If I wait for a 20-30sec it becomes usable. This happens in 2.6.21-rc7-mm2 
>> and
>> also in 2007-04-28-05-06 broken-out snapshot. I think 2.6.21-rc6-mm1 worked
>> fine, but I'm uncertain. If it is important, let me know to re-test.
>>
>> sysrq-t:
>>
>> yum   D 004C 0  2976   2955 (NOTLB)
>>c455bd00 00200082 8c68ea9e 004c   c455bcdc 
>> c455bc9c
>>c455bc9c c2d6a580 8c68ea9e 004c c455bcc0 c2d6a694 c1809980 
>> 
>>c455bcd0 c4640c80 36a0 0001 c455bcf0 c02a7132 c3682164 
>> 1cde
>> Call Trace:
>>  [] io_schedule+0x21/0x2e
>>  [] sync_page+0x38/0x43
>>  [] __wait_on_bit_lock+0x40/0x63
>>  [] __lock_page+0x54/0x5c
>>  [] do_generic_mapping_read+0x1dc/0x57e
>>  [] generic_file_aio_read+0xc9/0x1b5
>>  [] do_sync_read+0xd0/0x106
>>  [] vfs_read+0x89/0x11d
>>  [] sys_pread64+0x64/0x68
>>  [] syscall_call+0x7/0xb
>>  [<47176012>] 0x47176012
>>  ===
>> xterm S 0051 0  2980  1 (NOTLB)
>>c4678ae0 0082 b2fbf0ce 0051    
>> 
>>c4678b30 c469d540 b2fbf0ce 0051 c4678ab0 c469d654 c1813980 
>> 0001
>>c4678ad0 c47f0e40 c4678b00 0286 c4678ae0 c012c077 0001 
>> 3286
>> Call Trace:
>>  [] schedule_timeout+0x44/0xa4
>>  [] do_select+0x46d/0x55b
>>  [] core_sys_select+0x19e/0x2c0
>>  [] sys_select+0xd3/0x18d
>>  [] syscall_call+0x7/0xb
>>  [<47180f98>] 0x47180f98
>>  ===
>> bash  S 004A 0  2982   2980 (NOTLB)
>>c50b3e80 0086 ccf4cc7e 004a  c021bed9  
>> c45c0030
>>c50b3e30 c45c0030 ccf4cc7e 004a c50b3e50 c45c0144 c1809980 
>> 
>>c1809e44 c4517900  00b3 c50b3e90 c014f841 c477cb40 
>> c2d79000
>> Call Trace:
>>  [] schedule_timeout+0x6a/0xa4
>>  [] read_chan+0x1b9/0x5b9
>>  [] tty_read+0x75/0xaa
>>  [] vfs_read+0x89/0x11d
>>  [] sys_read+0x3d/0x64
>>  [] syscall_call+0x7/0xb
>>  [<4717883e>] 0x4717883e
>>  ===
>> metacity  S 0050 0  3005   2429 (NOTLB)
>>c2fd5bb0 0086 5205656d 0050    
>> c441c51c
>>0246 c45c0540 5205656d 0050 c2fd5b80 c45c0654 c1809980 
>> 
>>c1813e44 c27f4900 2cb8 0246 c2fd5ba0 c0135a80 c2fd5ba8 
>> 2cb2
>> Call Trace:
>>  [] schedule_timeout+0x6a/0xa4
>>  [] do_sys_poll+0x33f/0x46d
>>  [] sys_poll+0x41/0x43
>>  [] syscall_call+0x7/0xb
>>  [<4717e3a6>] 0x4717e3a6
>>  ===
>> ccpd  D 004C 0  3009   2010 (NOTLB)
>>c50abbb0 0082 f08ef585 004c   c180abc0 
>> c22fc788
>>c50abba0 c505d070 f08ef585 004c  c505d184 c1809980 
>> 
>>c21167f0 c2fc6740 c5794e3c c31eff74 c5794310 c22fc788 0002 
>> 1e64
>> Call Trace:
>>  [] do_get_write_access+0x310/0x4f5
>>  [] journal_get_write_access+0x1b/0x2a
>>  [] __ext3_journal_get_write_access+0x19/0x3f
>>  [] ext3_reserve_inode_write+0x53/0x6c
>>  [] ext3_mark_inode_dirty+0x20/0x37
>>  [] ext3_dirty_inode+0x6b/0x6d
>>  [] __mark_inode_dirty+0x2a/0x16d
>>  [] touch_atime+0x84/0xd8
>>  [] do_generic_mapping_read+0x463/0x57e
>>  [] generic_file_aio_read+0xc9/0x1b5
>>  [] do_sync_read+0xd0/0x106
>>  [] vfs_read+0x89/0x11d
>>  [] kernel_read+0x36/0x48
>>  [] prepare_binprm+0xb2/0xdf
>>  [] do_execve+0xe6/0x1e1
>>  [] sys_execve+0x2e/0x7f
>>  [] syscall_call+0x7/0xb
>>  [<471474da>] 0x471474da
>>  ===
>> bash  D 004D 0  3011   2859 (NOTLB)
>>c471dc90 0082 08f8373c 004d   c471dc30 
>> c471dc2c
>>c471dc2c c4670540 08f8373c 004d c471dc50 c4670654 c1809980 
>> 
>>c471dc60 c2f3f040 0005 0001 c471dc80 c02a7132 c591af64 
>> 1eea
>> Call Trace:
>>  [] io_schedule+0x21/0x2e
>>  [] sync_page+0x38/0x43
>>  [] __wait_on_bit_lock+0x40/0x63
>>  [] __lock_page+0x54/0x5c
>>  [] do_generic_mapping_read+0x1dc/0x57e
>>  [] generic_file_aio_read+0xc9/0x1b5
>>  [] do_sync_read+0xd0/0x106
>>  [] vfs_read+0x89/0x11d
>>  [] kernel_read+0x36/0x48
>>  [] prepare_binprm+0xb2/0xdf
>>  [] do_execve+0xe6/0x1e1
>>  [] sys_execve+0x2e/0x7f
>>  [] syscall_call+0x7/0xb
>>  [<471474da>] 0x471474da
>>  ===
>> bash  D 004D 0  3012   2884 (NOTLB)
>>c50d5a80 0082 a21bfc35 004d   c180abc0 
>> c2033dd4
>>c50d5a70 c2f4f070 a21bfc35 004d  c2f4f184 c1809980 
>> 
>>c21167bc c47f0c80 c

Re: 2.6.21-mm1: many processes end up in D state

2007-05-04 Thread Jiri Slaby


Jiri Slaby napsal(a):
> Cc: Mikael Pettersson <[EMAIL PROTECTED]>
> Cc: linux-ide@vger.kernel.org
> Cc: Jeff Garzik <[EMAIL PROTECTED]>
> 
> Jiri Slaby napsal(a):
>> Cc: [EMAIL PROTECTED]
>>
>> Jiri Slaby napsal(a):
>>> Hi,
>>>
>>> I have a problem with higher disk loads (e.g. running git-log or yum 
>>> update).
>>> Many processes end up in D state and system is unusable -- I'm not able to 
>>> run
>>> anything but smooth mouse moving when this happens.
>>>
>>> If I wait for a 20-30sec it becomes usable. This happens in 2.6.21-rc7-mm2 
>>> and
>>> also in 2007-04-28-05-06 broken-out snapshot. I think 2.6.21-rc6-mm1 worked
>>> fine, but I'm uncertain. If it is important, let me know to re-test.
>>>
>>> sysrq-t:
>>>
>>> yum   D 004C 0  2976   2955 (NOTLB)
>>>c455bd00 00200082 8c68ea9e 004c   c455bcdc 
>>> c455bc9c
>>>c455bc9c c2d6a580 8c68ea9e 004c c455bcc0 c2d6a694 c1809980 
>>> 
>>>c455bcd0 c4640c80 36a0 0001 c455bcf0 c02a7132 c3682164 
>>> 1cde
>>> Call Trace:
>>>  [] io_schedule+0x21/0x2e
>>>  [] sync_page+0x38/0x43
>>>  [] __wait_on_bit_lock+0x40/0x63
>>>  [] __lock_page+0x54/0x5c
>>>  [] do_generic_mapping_read+0x1dc/0x57e
>>>  [] generic_file_aio_read+0xc9/0x1b5
>>>  [] do_sync_read+0xd0/0x106
>>>  [] vfs_read+0x89/0x11d
>>>  [] sys_pread64+0x64/0x68
>>>  [] syscall_call+0x7/0xb
>>>  [<47176012>] 0x47176012
>>>  ===
>>> xterm S 0051 0  2980  1 (NOTLB)
>>>c4678ae0 0082 b2fbf0ce 0051    
>>> 
>>>c4678b30 c469d540 b2fbf0ce 0051 c4678ab0 c469d654 c1813980 
>>> 0001
>>>c4678ad0 c47f0e40 c4678b00 0286 c4678ae0 c012c077 0001 
>>> 3286
>>> Call Trace:
>>>  [] schedule_timeout+0x44/0xa4
>>>  [] do_select+0x46d/0x55b
>>>  [] core_sys_select+0x19e/0x2c0
>>>  [] sys_select+0xd3/0x18d
>>>  [] syscall_call+0x7/0xb
>>>  [<47180f98>] 0x47180f98
>>>  ===
>>> bash  S 004A 0  2982   2980 (NOTLB)
>>>c50b3e80 0086 ccf4cc7e 004a  c021bed9  
>>> c45c0030
>>>c50b3e30 c45c0030 ccf4cc7e 004a c50b3e50 c45c0144 c1809980 
>>> 
>>>c1809e44 c4517900  00b3 c50b3e90 c014f841 c477cb40 
>>> c2d79000
>>> Call Trace:
>>>  [] schedule_timeout+0x6a/0xa4
>>>  [] read_chan+0x1b9/0x5b9
>>>  [] tty_read+0x75/0xaa
>>>  [] vfs_read+0x89/0x11d
>>>  [] sys_read+0x3d/0x64
>>>  [] syscall_call+0x7/0xb
>>>  [<4717883e>] 0x4717883e
>>>  ===
>>> metacity  S 0050 0  3005   2429 (NOTLB)
>>>c2fd5bb0 0086 5205656d 0050    
>>> c441c51c
>>>0246 c45c0540 5205656d 0050 c2fd5b80 c45c0654 c1809980 
>>> 
>>>c1813e44 c27f4900 2cb8 0246 c2fd5ba0 c0135a80 c2fd5ba8 
>>> 2cb2
>>> Call Trace:
>>>  [] schedule_timeout+0x6a/0xa4
>>>  [] do_sys_poll+0x33f/0x46d
>>>  [] sys_poll+0x41/0x43
>>>  [] syscall_call+0x7/0xb
>>>  [<4717e3a6>] 0x4717e3a6
>>>  ===
>>> ccpd  D 004C 0  3009   2010 (NOTLB)
>>>c50abbb0 0082 f08ef585 004c   c180abc0 
>>> c22fc788
>>>c50abba0 c505d070 f08ef585 004c  c505d184 c1809980 
>>> 
>>>c21167f0 c2fc6740 c5794e3c c31eff74 c5794310 c22fc788 0002 
>>> 1e64
>>> Call Trace:
>>>  [] do_get_write_access+0x310/0x4f5
>>>  [] journal_get_write_access+0x1b/0x2a
>>>  [] __ext3_journal_get_write_access+0x19/0x3f
>>>  [] ext3_reserve_inode_write+0x53/0x6c
>>>  [] ext3_mark_inode_dirty+0x20/0x37
>>>  [] ext3_dirty_inode+0x6b/0x6d
>>>  [] __mark_inode_dirty+0x2a/0x16d
>>>  [] touch_atime+0x84/0xd8
>>>  [] do_generic_mapping_read+0x463/0x57e
>>>  [] generic_file_aio_read+0xc9/0x1b5
>>>  [] do_sync_read+0xd0/0x106
>>>  [] vfs_read+0x89/0x11d
>>>  [] kernel_read+0x36/0x48
>>>  [] prepare_binprm+0xb2/0xdf
>>>  [] do_execve+0xe6/0x1e1
>>>  [] sys_execve+0x2e/0x7f
>>>  [] syscall_call+0x7/0xb
>>>  [<471474da>] 0x471474da
>>>  ===
>>> bash  D 004D 0  3011   2859 (NOTLB)
>>>c471dc90 0082 08f8373c 004d   c471dc30 
>>> c471dc2c
>>>c471dc2c c4670540 08f8373c 004d c471dc50 c4670654 c1809980 
>>> 
>>>c471dc60 c2f3f040 0005 0001 c471dc80 c02a7132 c591af64 
>>> 1eea
>>> Call Trace:
>>>  [] io_schedule+0x21/0x2e
>>>  [] sync_page+0x38/0x43
>>>  [] __wait_on_bit_lock+0x40/0x63
>>>  [] __lock_page+0x54/0x5c
>>>  [] do_generic_mapping_read+0x1dc/0x57e
>>>  [] generic_file_aio_read+0xc9/0x1b5
>>>  [] do_sync_read+0xd0/0x106
>>>  [] vfs_read+0x89/0x11d
>>>  [] kernel_read+0x36/0x48
>>>  [] prepare_binprm+0xb2/0xdf
>>>  [] do_execve+0xe6/0x1e1
>>>  [] sys_execve+0x2e/0x7f
>>>  [] syscall_call+0x7/0xb
>>>  [<471474da>] 0x471474da
>>>  ===
>>> bash  D 004D 0  3012   2884 (NOTLB)
>>>c50d5a80 0082 a

Recent ipr breakage (ata_do_eh api change)

2007-05-04 Thread Brian King
I just noticed that the following patch (git-libata-all-ipr-fix)
is currently in mainline which results in inducing a compiler warning:

http://git.kernel.org/gitweb.cgi?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=120bda35ff8514c937dac6d4e5c7dc6c01c699ac;hp=771b8dad9653d2659e0ffcc237184cb16c317788

This looks like a fix for a compile problem with the libata-all
branch. I did some poking around and it looks like the ata_do_eh
api change is in Jeff's #all branch, but not in #upstream, so
I am assuming the ipr patch mentioned above should be reverted
in mainline for now.

Thanks,

Brian

-- 
Brian King
eServer Storage I/O
IBM Linux Technology Center
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Recent ipr breakage (ata_do_eh api change)

2007-05-04 Thread Jeff Garzik

Brian King wrote:

This looks like a fix for a compile problem with the libata-all
branch. I did some poking around and it looks like the ata_do_eh
api change is in Jeff's #all branch, but not in #upstream, so
I am assuming the ipr patch mentioned above should be reverted
in mainline for now.



At the moment, there is no #upstream branch.  It's all, um, upstream :)

What you see in #ALL is the combination of #reset-seq and #mv-ahci branches.

Jeff


-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: Problems with Linux SATA driver and ARC-770 IDE Bridge chip

2007-05-04 Thread Steven J. Ackerman
All-

Sorry, I've been out of town for a sudden illness and subsequent family
death.

Please provide me with a shipping address and/or other requisite
information.

Thank you,

Steven J. Ackerman, Consultant
ACS, Sarasota, FL
Work: http://www.acscontrol.com
   [EMAIL PROTECTED]
Blog: http://spaces.msn.com/sjackerman
 [EMAIL PROTECTED]
 
> -Original Message-
> From: Craig Metz [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 01, 2007 2:06 PM
> To: Mark Lord
> Cc: Tejun Heo; [EMAIL PROTECTED]; linux-ide@vger.kernel.org; Jeff
> Garzik; Alan Cox; [EMAIL PROTECTED]
> Subject: Re: Problems with Linux SATA driver and ARC-770 IDE Bridge chip
> 
> In message <[EMAIL PROTECTED]>, you write:
> >Craig Metz wrote:
> >>
> >>   What do I need to run in order to extract the full IDENTIFY data for
> you?
> >> Keep in mind that I can't get a kernel booted that will fully see this
> devic
> >> (i.e., no SCSI disk is ever allocated)
> >
> >That's tough, then.  Does it behave the same regardless of CF card?
> 
>   Yes. I've tried three different models of SanDisk card and a Lexar.
> 
> >Can I get hold of one of those adaptors here?
> 
>   I believe that Steve from ACS was willing to help with hardware.
> 
>
-Craig


-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Re: 2.6.19.1, sata_sil: sata dvd writer doesn't work

2007-05-04 Thread Harald Dunkel

Hi folks,

Tejun Heo suggested to post my problem here.

If I enter a movie DVD into my drive (Samsung SH-S183A, SATA)
and run xine dvd:/dev/scd0 immediately (while the drive's LED
is still blinking), then there is some timeout problem.
kern.log says:


May  4 19:10:17 pluto kernel: ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 
action 0x2 frozen
May  4 19:10:17 pluto kernel: ata2.00: cmd a0/01:00:00:00:00/00:00:00:00:00/a0 
tag 0 cdb 0xa4 data 8 in
May  4 19:10:17 pluto kernel:  res 40/00:02:00:04:08/00:00:00:00:00/a0 
Emask 0x4 (timeout)
May  4 19:10:17 pluto kernel: ata2: soft resetting port
May  4 19:10:24 pluto kernel: ata2: port is slow to respond, please be patient 
(Status 0xf8)
May  4 19:10:47 pluto kernel: ata2: port failed to respond (30 secs, Status 
0xf8)
May  4 19:10:47 pluto kernel: ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 
310)
May  4 19:10:47 pluto kernel: ATA: abnormal status 0xF8 on port 
0xc201a0c7
May  4 19:10:47 pluto last message repeated 5 times
May  4 19:11:17 pluto kernel: ata2.00: qc timeout (cmd 0xa1)
May  4 19:11:17 pluto kernel: ata2.00: failed to IDENTIFY (I/O error, 
err_mask=0x4)
May  4 19:11:17 pluto kernel: ata2.00: revalidation failed (errno=-5)
May  4 19:11:17 pluto kernel: ata2: failed to recover some devices, retrying in 
5 secs
May  4 19:11:22 pluto kernel: ata2: hard resetting port
May  4 19:11:23 pluto kernel: CLASSIFY TF 00/01:01:01:14:eb/a0 <6>ata2: SATA 
link up 1.5 Gbps (SStatus 113 SControl 310)
May  4 19:11:23 pluto kernel: ata2.00: XXX: IDENTIFY
May  4 19:11:23 pluto kernel: 00: 85c0        
May  4 19:11:23 pluto kernel: 08:   2020 2020  2020 2020 2020 2020
May  4 19:11:23 pluto kernel: 10: 2020 2020 2020 2020     5342
May  4 19:11:23 pluto kernel: 18: 3032 2020 2020 5453  5354 636f 7270 4344
May  4 19:11:23 pluto kernel: 20: 2f44 5644 5720 5348  2d53 3138 3341 2020
May  4 19:11:23 pluto kernel: 28: 2020 2020 2020 2020  2020 2020 2020 
May  4 19:11:23 pluto kernel: 30:  0f00  0200  0200 0006  
May  4 19:11:23 pluto kernel: 38:         0007
May  4 19:11:23 pluto kernel: 40: 0003 0078 0078 0078  0078   
May  4 19:11:23 pluto kernel: 48:      0602  0068 0040
May  4 19:11:23 pluto kernel: 50:    4000  4000   4000
May  4 19:11:23 pluto kernel: 58: 0407        
May  4 19:11:23 pluto kernel: 60:         
May  4 19:11:23 pluto kernel: 68:         
May  4 19:11:23 pluto kernel: 70:         
May  4 19:11:23 pluto kernel: 78:         
May  4 19:11:23 pluto kernel: 80:         
May  4 19:11:23 pluto kernel: 88:         
May  4 19:11:23 pluto kernel: 90:         
May  4 19:11:23 pluto kernel: 98:         
May  4 19:11:23 pluto kernel: a0:         
May  4 19:11:23 pluto kernel: a8:         
May  4 19:11:23 pluto kernel: b0:         
May  4 19:11:23 pluto kernel: b8:         
May  4 19:11:23 pluto kernel: c0:         
May  4 19:11:23 pluto kernel: c8:         
May  4 19:11:23 pluto kernel: d0:         
May  4 19:11:23 pluto kernel: d8:         
May  4 19:11:23 pluto kernel: e0:         
May  4 19:11:23 pluto kernel: e8:         
May  4 19:11:23 pluto kernel: f0:         
May  4 19:11:23 pluto kernel: f8:         9ca5
May  4 19:11:23 pluto kernel: ata2.00: configured for UDMA/33
May  4 19:11:23 pluto kernel: ata2: EH complete


Its pretty much reproducible. For the example above the DVD played
at the end, but sometimes the DVD drive dies, and I have to reboot.

If I enter a data DVD and try to mount it without waiting, then I get

% mount /cdrom
mount: /dev/scd0 already mounted or /cdrom busy
% mount /cdrom
%

There is no message in kern.log in this case. On the second try it
succeeds, as shown above.

If I enter a data DVD without running anything, then it takes
about 15 seconds till the LED goes off. Movie DVDs are a little
bit faster: 12 secs. But I am sure this depends.

Any help would be highly appreciated. Please keep me on CC:; I haven't
subscribed this ML.


Regards

Harri
==
Tejun Heo wrote:

Harald Dunkel wrote:

Hi Tejun,

Tejun Heo wrote:

The timeout is normal.  As the drive is still trying to recognize the
dvd, it doesn't respond to commands in the time specified by 

Re: SATA SB600 works in 2.6.20.4 but not in 2.6.21-rc5 with irqpoll parameter

2007-05-04 Thread Tejun Heo
Matí­as Alejandro Torres wrote:
> 
>> Matias, are you still there?  If so, can you please test the attached
>> patch and see whether it fixes your problem - ie. boots okay without
>> 'pci=nomsi'?
>>
>>  
>> 
> I've tried the patch and the kernel showsthe same behaviour. It does not
> work without the pci=nomsi parameter.
> 
> First, i tried with the 2.6.20.10 kernel and it did not work. Then i
> compile the kernel that i had when i start posting (2.6.20.4) but it was
> the same.
> 
> The sata controller mode in the BIOS has been always set to NATIVE-IDE.
> The logs corresponding to the 2.6.20.4 has the bios controller mode set
> to AHCI. But... that doesn't matter, does it?
> 
> I simply patched the kernel, is there any option that i have to enable
> so the modifications take effect?

Well, making it work without pci=nomsi is the whole point here.  I dunno
why this simple thing doesn't work.  Can you post the result of 'lspci
-nn' so that we can see the numeric ID?

-- 
tejun
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Fw: HPT366: 2.6.21 breaks HPT366 detection on boot

2007-05-04 Thread Sergei Shtylyov

Hello.

Andrew Morton wrote:

fyi..  (followup on-list if so inclined, please)



Begin forwarded message:



Date: Fri, 4 May 2007 18:44:18 +0200
From: Michal Kepien <[EMAIL PROTECTED]>
To: The Linux Kernel Mailing List <[EMAIL PROTECTED]>
Subject: HPT366: 2.6.21 breaks HPT366 detection on boot



Hi there all kernel hackers,



I own an Abit BE-6 v1 mainboard with an on-board HPT366 controller. Until kernel
version 2.6.20.7 it worked perfectly, however 2.6.21 broke it. My system is
Slackware 11.0 + current. Relevant log fragments:



2.6.20.7:
=



---
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
PIIX4: IDE controller at PCI slot :00:07.1
PIIX4: chipset revision 1
PIIX4: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0xf000-0xf007, BIOS settings: hda:DMA, hdb:pio
ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc:pio, hdd:pio
Probing IDE interface ide0...
hda: SAMSUNG CD-R/RW SW-252B, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
HPT366: onboard version of chipset, pin1=1 pin2=2
HPT366: IDE controller at PCI slot :00:13.0
PCI: setting IRQ 11 as level-triggered
PCI: Found IRQ 11 for device :00:13.0
PCI: Sharing IRQ 11 with :00:0b.0
PCI: Sharing IRQ 11 with :00:13.1
HPT366: chipset revision 1
HPT366: 100% native mode on irq 11
ide2: BM-DMA at 0xd800-0xd807, BIOS settings: hde:DMA, hdf:pio
PCI: Found IRQ 11 for device :00:13.1
PCI: Sharing IRQ 11 with :00:0b.0
PCI: Sharing IRQ 11 with :00:13.0
ide3: BM-DMA at 0xe400-0xe407, BIOS settings: hdg:pio, hdh:pio
Probing IDE interface ide2...
hde: IBM-DJNA-371350, ATA DISK drive
hde: hw_config=2000
hde: hw_config=2000
ide2 at 0xd000-0xd007,0xd402 on irq 11
Probing IDE interface ide3...
hde: max request size: 128KiB
hde: 26520480 sectors (13578 MB) w/1966KiB Cache, CHS=26310/16/63, UDMA(33)
hde: cache flushes not supported
 hde: hde1 hde2 < hde5 >
hda: ATAPI 52X CD-ROM CD-R/RW drive, 2048kB Cache, UDMA(33)
---



2.6.21(.1):
===



---
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
PIIX4: IDE controller at PCI slot :00:07.1
PIIX4: chipset revision 1
PIIX4: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0xf000-0xf007, BIOS settings: hda:DMA, hdb:pio
ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc:pio, hdd:pio
hda: SAMSUNG CD-R/RW SW-252B, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
HPT366: onboard version of chipset, pin1=1 pin2=2
HPT366: IDE controller at PCI slot :00:13.0
PCI: setting IRQ 11 as level-triggered
PCI: Found IRQ 11 for device :00:13.0
PCI: Sharing IRQ 11 with :00:0b.0
PCI: Sharing IRQ 11 with :00:13.1
HPT366: chipset revision 1
HPT366: using 33 MHz PCI clock
HPT366: 100% native mode on irq 11
HPT366: neither IDE port enabled (BIOS)
PCI: Found IRQ 11 for device :00:13.1
PCI: Sharing IRQ 11 with :00:0b.0
PCI: Sharing IRQ 11 with :00:13.0
HPT366: using 33 MHz PCI clock
HPT366: neither IDE port enabled (BIOS)


   Looks I was too bold with my 'enablebits' assumption and HPT366 didn't yet 
have them. I'll send a patch to try soon.



hda: ATAPI 52X CD-ROM CD-R/RW drive, 2048kB Cache, UDMA(33)
---

Booting the system with 2.6.21 results in a kernel panic:

---
VFS: Cannot open root device "2101" or unknown-block(31,1)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,1) 
---



I'd happily try out any patches and/or supply you with more details on demand.


MBR, Sergei
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[patch 0/7] Asynchronous Notification for ATAPI devices (v2) - resend

2007-05-04 Thread Kristen Carlson Accardi
This patch series implements Asynchronous Notification (AN) for SATA
ATAPI devices as defined in SATA 2.5 and AHCI 1.1 and higher.  Drives
which support this feature will send a notification when new media is
inserted and removed, preventing the need for user space to poll for
new media.  This support is exposed to user space via a flag that will
be set in /sys/block/sr*/capability_flags.  If the flag is set, user
space can disable polling for the new media, and the genhd driver will
send a KOBJ_CHANGE event with the envp set to MEDIA_CHANGE_EVENT=1.

Note that this patch only implements support for directly attached
drives - AN with drives attached to a port multiplier requires 
additional changes.

Thanks!
Kristen

-- 
-- 
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[patch 1/7] libata: check for AN support - resend

2007-05-04 Thread Kristen Carlson Accardi
Check to see if an ATAPI device supports Asynchronous Notification.
If so, enable it.

Changes from last version:
* use parens around id in ata.h

Signed-off-by: Kristen Carlson Accardi <[EMAIL PROTECTED]>

Index: 2.6-git/drivers/ata/libata-core.c
===
--- 2.6-git.orig/drivers/ata/libata-core.c
+++ 2.6-git/drivers/ata/libata-core.c
@@ -70,6 +70,7 @@ const unsigned long sata_deb_timing_long
 static unsigned int ata_dev_init_params(struct ata_device *dev,
u16 heads, u16 sectors);
 static unsigned int ata_dev_set_xfermode(struct ata_device *dev);
+static unsigned int ata_dev_set_AN(struct ata_device *dev);
 static void ata_dev_xfermask(struct ata_device *dev);
 
 static unsigned int ata_print_id = 1;
@@ -1744,6 +1745,22 @@ int ata_dev_configure(struct ata_device 
}
dev->cdb_len = (unsigned int) rc;
 
+   /*
+* check to see if this ATAPI device supports
+* Asynchronous Notification
+*/
+   if ((ap->flags & ATA_FLAG_AN) && ata_id_has_AN(id)) {
+   int err;
+   /* issue SET feature command to turn this on */
+   err = ata_dev_set_AN(dev);
+   if (err)
+   ata_dev_printk(dev, KERN_ERR,
+   "unable to set AN, err %x\n",
+   err);
+   else
+   dev->flags |= ATA_DFLAG_AN;
+   }
+
if (ata_id_cdb_intr(dev->id)) {
dev->flags |= ATA_DFLAG_CDB_INTR;
cdb_intr_string = ", CDB intr";
@@ -3525,6 +3542,42 @@ static unsigned int ata_dev_set_xfermode
 }
 
 /**
+ * ata_dev_set_AN - Issue SET FEATURES - SATA FEATURES
+ *   with sector count set to indicate
+ *   Asynchronous Notification feature
+ * @dev: Device to which command will be sent
+ *
+ * Issue SET FEATURES - SATA FEATURES command to device @dev
+ * on port @ap.
+ *
+ * LOCKING:
+ * PCI/etc. bus probe sem.
+ *
+ * RETURNS:
+ * 0 on success, AC_ERR_* mask otherwise.
+ */
+static unsigned int ata_dev_set_AN(struct ata_device *dev)
+{
+   struct ata_taskfile tf;
+   unsigned int err_mask;
+
+   /* set up set-features taskfile */
+   DPRINTK("set features - SATA features\n");
+
+   ata_tf_init(dev, &tf);
+   tf.command = ATA_CMD_SET_FEATURES;
+   tf.feature = SETFEATURES_SATA_ENABLE;
+   tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
+   tf.protocol = ATA_PROT_NODATA;
+   tf.nsect = SATA_AN;
+
+   err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0);
+
+   DPRINTK("EXIT, err_mask=%x\n", err_mask);
+   return err_mask;
+}
+
+/**
  * ata_dev_init_params - Issue INIT DEV PARAMS command
  * @dev: Device to which command will be sent
  * @heads: Number of heads (taskfile parameter)
Index: 2.6-git/include/linux/ata.h
===
--- 2.6-git.orig/include/linux/ata.h
+++ 2.6-git/include/linux/ata.h
@@ -194,6 +194,12 @@ enum {
SETFEATURES_WC_ON   = 0x02, /* Enable write cache */
SETFEATURES_WC_OFF  = 0x82, /* Disable write cache */
 
+   SETFEATURES_SATA_ENABLE = 0x10, /* Enable use of SATA feature */
+   SETFEATURES_SATA_DISABLE = 0x90, /* Disable use of SATA feature */
+
+   /* SETFEATURE Sector counts for SATA features */
+   SATA_AN = 0x05,  /* Asynchronous Notification */
+
/* ATAPI stuff */
ATAPI_PKT_DMA   = (1 << 0),
ATAPI_DMADIR= (1 << 2), /* ATAPI data dir:
@@ -299,6 +305,9 @@ struct ata_taskfile {
 #define ata_id_queue_depth(id) (((id)[75] & 0x1f) + 1)
 #define ata_id_removeable(id)  ((id)[0] & (1 << 7))
 #define ata_id_has_dword_io(id)((id)[50] & (1 << 0))
+#define ata_id_has_AN(id)  \
+   ( (((id)[76] != 0x) && ((id)[76] != 0x)) && \
+ ((id)[78] & (1 << 5)) )
 #define ata_id_iordy_disable(id) ((id)[49] & (1 << 10))
 #define ata_id_has_iordy(id) ((id)[49] & (1 << 9))
 #define ata_id_u32(id,n)   \
Index: 2.6-git/include/linux/libata.h
===
--- 2.6-git.orig/include/linux/libata.h
+++ 2.6-git/include/linux/libata.h
@@ -136,6 +136,7 @@ enum {
ATA_DFLAG_CDB_INTR  = (1 << 2), /* device asserts INTRQ when ready 
for CDB */
ATA_DFLAG_NCQ   = (1 << 3), /* device supports NCQ */
ATA_DFLAG_FLUSH_EXT = (1 << 4), /* do FLUSH_EXT instead of FLUSH */
+   ATA_DFLAG_AN= (1 << 5), /* device supports Async 
notification */
ATA_DFLAG_CFG_MASK  = (1 << 8) - 1,
 
ATA_DFLAG_PIO   = (1 << 8), /*

[patch 2/7] genhd: expose AN to user space - resend

2007-05-04 Thread Kristen Carlson Accardi
Allow user space to determine if a disk supports Asynchronous Notification
of media changes.  This is done by adding a new sysfs file "capability_flags",
which is documented in (insert file name).  This sysfs file will export all
disk capabilities flags to user space.  We also define a new flag to define
the media change notification capability.

Changed from last version:
* changed sysfs filename to "capability" from "capability_flags"

Signed-off-by: Kristen Carlson Accardi <[EMAIL PROTECTED]>

Index: 2.6-git/block/genhd.c
===
--- 2.6-git.orig/block/genhd.c
+++ 2.6-git/block/genhd.c
@@ -370,7 +370,10 @@ static ssize_t disk_size_read(struct gen
 {
return sprintf(page, "%llu\n", (unsigned long long)get_capacity(disk));
 }
-
+static ssize_t disk_capability_read(struct gendisk *disk, char *page)
+{
+   return sprintf(page, "%x\n", disk->flags);
+}
 static ssize_t disk_stats_read(struct gendisk * disk, char *page)
 {
preempt_disable();
@@ -413,6 +416,10 @@ static struct disk_attribute disk_attr_s
.attr = {.name = "size", .mode = S_IRUGO },
.show   = disk_size_read
 };
+static struct disk_attribute disk_attr_capability = {
+   .attr = {.name = "capability", .mode = S_IRUGO },
+   .show   = disk_capability_read
+};
 static struct disk_attribute disk_attr_stat = {
.attr = {.name = "stat", .mode = S_IRUGO },
.show   = disk_stats_read
@@ -453,6 +460,7 @@ static struct attribute * default_attrs[
&disk_attr_removable.attr,
&disk_attr_size.attr,
&disk_attr_stat.attr,
+   &disk_attr_capability.attr,
 #ifdef CONFIG_FAIL_MAKE_REQUEST
&disk_attr_fail.attr,
 #endif
Index: 2.6-git/include/linux/genhd.h
===
--- 2.6-git.orig/include/linux/genhd.h
+++ 2.6-git/include/linux/genhd.h
@@ -94,6 +94,7 @@ struct hd_struct {
 
 #define GENHD_FL_REMOVABLE 1
 #define GENHD_FL_DRIVERFS  2
+#define GENHD_FL_MEDIA_CHANGE_NOTIFY   4
 #define GENHD_FL_CD8
 #define GENHD_FL_UP16
 #define GENHD_FL_SUPPRESS_PARTITION_INFO   32
Index: 2.6-git/Documentation/block/capability.txt
===
--- /dev/null
+++ 2.6-git/Documentation/block/capability.txt
@@ -0,0 +1,15 @@
+Generic Block Device Capability
+===
+This file documents the sysfs file block//capability
+
+capability is a hex word indicating which capabilities a specific disk
+supports.  For more information on bits not listed here, see
+include/linux/genhd.h
+
+Capability Value
+---
+GENHD_FL_MEDIA_CHANGE_NOTIFY   4
+   When this bit is set, the disk supports Asynchronous Notification
+   of media change events.  These events will be broadcast to user
+   space via kernel uevent.
+
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[patch 3/7] scsi: expose AN to user space - resend

2007-05-04 Thread Kristen Carlson Accardi
Get media change notification capability from disk and pass this information
to genhd by setting appropriate flag.

Signed-off-by: Kristen Carlson Accardi <[EMAIL PROTECTED]>

Index: 2.6-git/drivers/scsi/sr.c
===
--- 2.6-git.orig/drivers/scsi/sr.c
+++ 2.6-git/drivers/scsi/sr.c
@@ -601,6 +601,8 @@ static int sr_probe(struct device *dev)
 
dev_set_drvdata(dev, cd);
disk->flags |= GENHD_FL_REMOVABLE;
+   if (sdev->media_change_notify)
+   disk->flags |= GENHD_FL_MEDIA_CHANGE_NOTIFY;
add_disk(disk);
 
sdev_printk(KERN_DEBUG, sdev,
Index: 2.6-git/include/scsi/scsi_device.h
===
--- 2.6-git.orig/include/scsi/scsi_device.h
+++ 2.6-git/include/scsi/scsi_device.h
@@ -124,7 +124,7 @@ struct scsi_device {
unsigned fix_capacity:1;/* READ_CAPACITY is too high by 1 */
unsigned guess_capacity:1;  /* READ_CAPACITY might be too high by 1 
*/
unsigned retry_hwerror:1;   /* Retry HARDWARE_ERROR */
-
+   unsigned media_change_notify:1; /* dev supports async media notify */
unsigned int device_blocked;/* Device returned QUEUE_FULL. */
 
unsigned int max_device_blocked; /* what device_blocked counts down 
from  */
Index: 2.6-git/drivers/scsi/sd.c
===
--- 2.6-git.orig/drivers/scsi/sd.c
+++ 2.6-git/drivers/scsi/sd.c
@@ -1706,6 +1706,9 @@ static int sd_probe(struct device *dev)
if (sdp->removable)
gd->flags |= GENHD_FL_REMOVABLE;
 
+   if (sdp->media_change_notify)
+   gd->flags |= GENHD_FL_MEDIA_CHANGE_NOTIFY;
+
dev_set_drvdata(dev, sdkp);
add_disk(gd);
 

-- 
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Re: 2.6.19.1, sata_sil: sata dvd writer doesn't work

2007-05-04 Thread Daniel Beichl

Tejun Heo wrote:

Daniel Beichl wrote:
  

I reverted to my initial patch and added a printk line to log the first
command byte and
qc->nbytes for each command that has been reduced to pio and
authenticated a dvd:

not Authenticated
ata2.00: Reduce cmd 0xa4 (nbytes=0) to pio
Request AGID [1]... AGID 3
Host sending challenge:  68 96 40 A8 F2 1A 66 ED A9 33
ata2.00: Reduce cmd 0xa4 (nbytes=0) to pio
ata2.00: Reduce cmd 0xa3 (nbytes=0) to pio
LU sent key1:  65 A0 60 C5 22
Drive Authentic - using varient 0
ata2.00: Reduce cmd 0xa4 (nbytes=0) to pio
LU sent challenge:  D8 D1 AA A6 45 A8 40 33 1C CB
Host sending key 2:  A7 90 93 04 B6
ata2.00: Reduce cmd 0xa4 (nbytes=0) to pio
DVD is authenticated
Received Session Key:   7C A0 0F E9 E2
ata2.00: Reduce cmd 0xa3 (nbytes=0) to pio
not Authenticated
ata2.00: Reduce cmd 0xa4 (nbytes=0) to pio
Received Disc Key:  55 43 42 B3 C5 FB 6A 00 46 39
Authenticated
ata2.00: Reduce cmd 0xa4 (nbytes=0) to pio

As you can see, every command had a qc->nbytes of zero,
therefore your code would have allowed dma transfer as "(0 & 511) != 0"
is false(0)
and returning 0 allows dma.

I wonder why these commands have a nbytes of zero, perhaps its the
amount of data sectors transferred? I have searched
the libata documentation pdf and did a quick google search, but i
didn't come up with anything useful.
So your suggestion would work if you say size is not aligned to
ATA_SECT_SIZE or zero, i.e:

/* returning 0 allows dma everything else does not */
return ((qc->nbytes & (ATA_SECT_SIZE-1)) || (qc->nbytes == 0));

But why do you think this should be dependent on the qc->nbytes attribute
as the authentification commands all have nbytes set to zero?
Are you aware of some other issues with this sata controller?

It would be great to drill this down further, but i have no clue how to
continue. If you have any suggestions please let me know.



Okay, I've been thinking about it for some time.  I think I know what's
going on now.  Those authentication related commands are issued by
invoking ioctls on the device node.  The cdrom driver receives the
ioctls and issues respective SCSI commands for it.  All those DVD auth
commands either transfer or receive data from the device and thus
specifies certain data direction when they're issued.  libata selects
command protocol accordingly.

It's all good and dandy till now but the problem is that those commands
can be issued with data length of zero!  This is allowed by the SCSI MMC
standard and used to probe whether the command succeeds or not before
taking further actions.  When this happens, libata chooses command
protocol according to the data direction, but has to feed 0-length data
to the DMA engine.  It seems sata_sil dma engine barfs if that happens.
 Can you please add the following code snippet at the head of atapi_xlat()?

if (!nodata && !qc->nbytes) {
printk("XXX forcing PIO for 0 length data cdb %02x\n",
scmd->cmnd[0]);
dump_stack();
using_pio = 1;
}

Also, do you mind cc'ing [EMAIL PROTECTED]

  

Hi Tejun,


i inserted the code snippet you mentioned to atapi_xlat() in libata-scsi.c
and the dvd authentication succeeds.

Please see the attached dmesg file for the generated stack dumps.

The question is whether this is the right place to fix it, as this seems 
to limit all

drivers to pio if a zero data length command is transferred.
It would make more sense to me if the individual driver decides this by
performing a similar check in the check_atapi_dma function implemented 
by the

individual driver. I did this for the sata_sil driver in the attached patch.

Thanks for sharing your insight,

Daniel
.c: subsystem: 01297:a550 bound to :00:05.0
ACPI: PCI Interrupt Link [LNK2] enabled at IRQ 11
PCI: setting IRQ 11 as level-triggered
ACPI: PCI Interrupt :01:05.0[A] -> Link [LNK2] -> GSI 11 (level, low) -> 
IRQ 11
sym0: <875> rev 0x26 at pci :01:05.0 irq 11
ACPI: PCI Interrupt Link [LUB2] enabled at IRQ 9
PCI: setting IRQ 9 as level-triggered
ACPI: PCI Interrupt :00:02.2[C] -> Link [LUB2] -> GSI 9 (level, low) -> IRQ 
9
PCI: Setting latency timer of device :00:02.2 to 64
ehci_hcd :00:02.2: EHCI Host Controller
ehci_hcd :00:02.2: new USB bus registered, assigned bus number 1
ehci_hcd :00:02.2: debug port 1
PCI: cache line size of 64 is not supported by device :00:02.2
ehci_hcd :00:02.2: irq 9, io mem 0xe8005000
ehci_hcd :00:02.2: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 6 ports detected
sym0: Tekram NVRAM, ID 7, Fast-20, SE, parity checking
sym0: SCSI BUS has been reset.
scsi2 : sym-2.2.3
usb 1-2: new high speed USB device using ehci_hcd and address 3
usb 1-2: configuration #1 chosen from 1 choice
hub 1-2:1.0: USB hub found
hub 1-2:1.0: 4 ports detected
usb 1-3: new high speed USB device using ehci_hcd and address 4

[patch 4/7] libata: expose AN to user space - resend

2007-05-04 Thread Kristen Carlson Accardi
If Asynchronous Notification of media change events is supported,
pass that information up to the SCSI layer.

Signed-off-by: Kristen Carlson Accardi <[EMAIL PROTECTED]>

Index: 2.6-git/drivers/ata/libata-scsi.c
===
--- 2.6-git.orig/drivers/ata/libata-scsi.c
+++ 2.6-git/drivers/ata/libata-scsi.c
@@ -899,6 +899,9 @@ static void ata_scsi_dev_config(struct s
blk_queue_max_hw_segments(q, q->max_hw_segments - 1);
}
 
+   if (dev->flags & ATA_DFLAG_AN)
+   sdev->media_change_notify = 1;
+
if (dev->flags & ATA_DFLAG_NCQ) {
int depth;
 

-- 
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[patch 6/7] SCSI: save disk in scsi_device - resend

2007-05-04 Thread Kristen Carlson Accardi
Give anyone who has access to scsi_device access to the genhd struct as well.

Signed-off-by: Kristen Carlson Accardi <[EMAIL PROTECTED]>
Index: 2.6-git/drivers/scsi/sd.c
===
--- 2.6-git.orig/drivers/scsi/sd.c
+++ 2.6-git/drivers/scsi/sd.c
@@ -1711,6 +1711,7 @@ static int sd_probe(struct device *dev)
 
dev_set_drvdata(dev, sdkp);
add_disk(gd);
+   sdp->disk = gd;
 
sdev_printk(KERN_NOTICE, sdp, "Attached scsi %sdisk %s\n",
sdp->removable ? "removable " : "", gd->disk_name);
Index: 2.6-git/drivers/scsi/sr.c
===
--- 2.6-git.orig/drivers/scsi/sr.c
+++ 2.6-git/drivers/scsi/sr.c
@@ -604,6 +604,7 @@ static int sr_probe(struct device *dev)
if (sdev->media_change_notify)
disk->flags |= GENHD_FL_MEDIA_CHANGE_NOTIFY;
add_disk(disk);
+   sdev->disk = disk;
 
sdev_printk(KERN_DEBUG, sdev,
"Attached scsi CD-ROM %s\n", cd->cdi.name);
Index: 2.6-git/include/scsi/scsi_device.h
===
--- 2.6-git.orig/include/scsi/scsi_device.h
+++ 2.6-git/include/scsi/scsi_device.h
@@ -138,7 +138,7 @@ struct scsi_device {
 
struct device   sdev_gendev;
struct class_device sdev_classdev;
-
+   struct gendisk  *disk;
struct execute_work ew; /* used to get process context on put */
 
enum scsi_device_state sdev_state;

-- 
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[patch 7/7] libata: send event when AN received - resend

2007-05-04 Thread Kristen Carlson Accardi
When we get an SDB FIS with the 'N' bit set, we should send
an event to user space to indicate that there has been a
media change.  This will be done via the block device. 

changed from last version:
* Make sure that port_addr is within ATA_MAX_DEVICES

Signed-off-by: Kristen Carlson Accardi <[EMAIL PROTECTED]>
Index: 2.6-git/drivers/ata/ahci.c
===
--- 2.6-git.orig/drivers/ata/ahci.c
+++ 2.6-git/drivers/ata/ahci.c
@@ -1147,6 +1147,28 @@ static void ahci_host_intr(struct ata_po
return;
}
 
+   if (status & PORT_IRQ_SDB_FIS) {
+   /*
+* if this is an ATAPI device with AN turned on,
+* then we should interrogate the device to
+* determine the cause of the interrupt
+*
+* for AN - this we should check the SDB FIS
+* and find the I and N bits set
+*/
+   const u32 *f = pp->rx_fis + RX_FIS_SDB;
+
+   /* check the 'N' bit in word 0 of the FIS */
+   if (f[0] & (1 << 15)) {
+   int port_addr =  ((f[0] & 0x0f00) >> 8);
+   struct ata_device *adev;
+   if (port_addr < ATA_MAX_DEVICES) {
+   adev = &ap->device[port_addr];
+   if (adev->flags & ATA_DFLAG_AN)
+   ata_scsi_media_change_notify(adev);
+   }
+   }
+   }
if (ap->sactive)
qc_active = readl(port_mmio + PORT_SCR_ACT);
else
Index: 2.6-git/include/linux/libata.h
===
--- 2.6-git.orig/include/linux/libata.h
+++ 2.6-git/include/linux/libata.h
@@ -737,6 +737,7 @@ extern void ata_host_init(struct ata_hos
 extern int ata_scsi_detect(struct scsi_host_template *sht);
 extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg);
 extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct 
scsi_cmnd *));
+extern void ata_scsi_media_change_notify(struct ata_device *atadev);
 extern void ata_sas_port_destroy(struct ata_port *);
 extern struct ata_port *ata_sas_port_alloc(struct ata_host *,
   struct ata_port_info *, struct 
Scsi_Host *);
Index: 2.6-git/drivers/ata/libata-scsi.c
===
--- 2.6-git.orig/drivers/ata/libata-scsi.c
+++ 2.6-git/drivers/ata/libata-scsi.c
@@ -3057,6 +3057,22 @@ static void ata_scsi_remove_dev(struct a
 }
 
 /**
+ * ata_scsi_media_change_notify - send media change event
+ * @atadev: Pointer to the disk device with media change event
+ *
+ * Tell the block layer to send a media change notification
+ * event.
+ *
+ * LOCKING:
+ * interrupt context, may not sleep.
+ */
+void ata_scsi_media_change_notify(struct ata_device *atadev)
+{
+   genhd_media_change_notify(atadev->sdev->disk);
+}
+EXPORT_SYMBOL_GPL(ata_scsi_media_change_notify);
+
+/**
  * ata_scsi_hotplug - SCSI part of hotplug
  * @work: Pointer to ATA port to perform SCSI hotplug on
  *
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 5/7] genhd: send async notification on media change

2007-05-04 Thread Kristen Carlson Accardi
Send an uevent to user space to indicate that a media change event has occurred.

Changes from last version:
* use get/put_device to increment reference count on the device struct

Signed-off-by: Kristen Carlson Accardi <[EMAIL PROTECTED]>

Index: 2.6-git/block/genhd.c
===
--- 2.6-git.orig/block/genhd.c
+++ 2.6-git/block/genhd.c
@@ -643,6 +643,27 @@ struct seq_operations diskstats_op = {
.show   = diskstats_show
 };
 
+static void media_change_notify_thread(struct work_struct *work)
+{
+   struct gendisk *gd = container_of(work, struct gendisk, async_notify);
+   char event[] = "MEDIA_CHANGE=1";
+   char *envp[] = { event, NULL };
+
+   /*
+* set enviroment vars to indicate which event this is for
+* so that user space will know to go check the media status.
+*/
+   kobject_uevent_env(&gd->kobj, KOBJ_CHANGE, envp);
+   put_device(gd->driverfs_dev);
+}
+
+void genhd_media_change_notify(struct gendisk *disk)
+{
+   get_device(disk->driverfs_dev);
+   schedule_work(&disk->async_notify);
+}
+EXPORT_SYMBOL_GPL(genhd_media_change_notify);
+
 struct gendisk *alloc_disk(int minors)
 {
return alloc_disk_node(minors, -1);
@@ -672,6 +693,8 @@ struct gendisk *alloc_disk_node(int mino
kobj_set_kset_s(disk,block_subsys);
kobject_init(&disk->kobj);
rand_initialize_disk(disk);
+   INIT_WORK(&disk->async_notify,
+   media_change_notify_thread);
}
return disk;
 }
Index: 2.6-git/include/linux/genhd.h
===
--- 2.6-git.orig/include/linux/genhd.h
+++ 2.6-git/include/linux/genhd.h
@@ -66,6 +66,7 @@ struct partition {
 #include 
 #include 
 #include 
+#include 
 
 struct partition {
unsigned char boot_ind; /* 0x80 - active */
@@ -139,6 +140,7 @@ struct gendisk {
 #else
struct disk_stats dkstats;
 #endif
+   struct work_struct async_notify;
 };
 
 /* Structure for sysfs attributes on block devices */
@@ -419,7 +421,7 @@ extern struct gendisk *alloc_disk_node(i
 extern struct gendisk *alloc_disk(int minors);
 extern struct kobject *get_disk(struct gendisk *disk);
 extern void put_disk(struct gendisk *disk);
-
+extern void genhd_media_change_notify(struct gendisk *disk);
 extern void blk_register_region(dev_t dev, unsigned long range,
struct module *module,
struct kobject *(*probe)(dev_t, int *, void *),
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH pata-2.6 fix queue] hpt366: don't check enablebits for HPT36x

2007-05-04 Thread Sergei Shtylyov
HPT36x chip don't seem to have the channel enable bits, so prevent the IDE core
from checking them...

Signed-off-by: Sergei Shtylyov <[EMAIL PROTECTED]>

---
Michal, sorry for unintended breakage, please verify the patch... :-)

 drivers/ide/pci/hpt366.c |7 ++-
 1 files changed, 6 insertions(+), 1 deletion(-)

Index: linux-2.6/drivers/ide/pci/hpt366.c
===
--- linux-2.6.orig/drivers/ide/pci/hpt366.c
+++ linux-2.6/drivers/ide/pci/hpt366.c
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/ide/pci/hpt366.c  Version 1.02Apr 18, 2007
+ * linux/drivers/ide/pci/hpt366.c  Version 1.03May 4, 2007
  *
  * Copyright (C) 1999-2003 Andre Hedrick <[EMAIL PROTECTED]>
  * Portions Copyright (C) 2001 Sun Microsystems, Inc.
@@ -1527,7 +1527,12 @@ static int __devinit init_setup_hpt366(s
if (rev > 2)
goto init_single;
 
+   /*
+* HPT36x chips are single channel and
+* do not seem to have the channel enable bit...
+*/
d->channels = 1;
+   d->enablebits[0].reg = 0;
 
if ((dev2 = pci_get_slot(dev->bus, dev->devfn + 1)) != NULL) {
u8  pin1 = 0, pin2 = 0;

-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: 2.6.21-mm1: many processes end up in D state

2007-05-04 Thread Mikael Pettersson
On Fri, 04 May 2007 17:02:10 +0200, Jiri Slaby wrote:
 I have a problem with higher disk loads (e.g. running git-log or yum 
 update).
 Many processes end up in D state and system is unusable -- I'm not able to 
 run
 anything but smooth mouse moving when this happens.
...(boring stack dumps deleted)
>> causes this? When I change this:
>> diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c
>> index f56549b..a0024ae 100644
>> --- a/drivers/ata/sata_promise.c
>> +++ b/drivers/ata/sata_promise.c
>> @@ -668,10 +668,8 @@ static inline unsigned int pdc_host_intr( struct 
>> ata_port *ap,
>> else
>> err_mask &= ~PDC2_ERR_MASK;
>> port_status = readl(port_mmio + PDC_GLOBAL_CTL);
>> -   if (unlikely(port_status & err_mask)) {
>> +   if (unlikely(port_status & err_mask))
>> pdc_error_intr(ap, qc, port_status, err_mask);
>> -   return 1;
>> -   }
>> 
>> switch (qc->tf.protocol) {
>> case ATA_PROT_DMA:
>> the problem disappears.
>Actually changes:
>ata6.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
>ata6.00: (port_status 0x2008)
>ata6.00: cmd c8/00:08:03:d3:61/00:00:00:00:00/e0 tag 0 cdb 0x0 data 4096 in
> res 40/00:01:01:4f:c2/00:00:00:00:00/00 Emask 0x6 (timeout)
>ata6: soft resetting port
>ata6: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
>ata6.00: ata_hpa_resize 1: sectors = 156301488, hpa_sectors = 156301488
>ata6.00: ata_hpa_resize 1: sectors = 156301488, hpa_sectors = 156301488
>ata6.00: configured for UDMA/133
>ata6: EH complete
>sd 5:0:0:0: [sdc] 156301488 512-byte hardware sectors (80026 MB)
>sd 5:0:0:0: [sdc] Write Protect is off
>sd 5:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support 
>DPO
>or FUA
>
>
>to
>ata5.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2
>ata5.00: (port_status 0x2008)
>ata5.00: cmd c8/00:08:bf:cd:4b/00:00:00:00:00/e0 tag 0 cdb 0x0 data 4096 in
> res 50/00:00:c6:cd:4b/00:00:00:00:00/e0 Emask 0x2 (HSM violation)
>ata5: soft resetting port
>ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
>ata5.00: ata_hpa_resize 1: sectors = 156301488, hpa_sectors = 156301488
>ata5.00: ata_hpa_resize 1: sectors = 156301488, hpa_sectors = 156301488
>ata5.00: configured for UDMA/133
>ata5: EH complete
>sd 4:0:0:0: [sdb] 156301488 512-byte hardware sectors (80026 MB)
>sd 4:0:0:0: [sdb] Write Protect is off
>sd 4:0:0:0: [sdb] Mode Sense: 00 3a 00 00
>sd 4:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support 
>DPO
>or FUA
>
>
>I.e. no freezing of ports...

Your patch to delete the 'return 1;' on error is correct,
and makes the code match exactly the behaviour of previous
versions of sata_promise, except for the additional error
decoding.

ahci and sata_sil24 do the return in this situation. I don't
yet understand why they can get away with it while sata_promise
cannot, but for now the return should be removed.

/Mikael
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCHSET] libata: reimplement suspend/resume support and fix spindown on poweroff

2007-05-04 Thread Tejun Heo
Hello,

This is another take at using sdev->manage_start_stop to reimplement
suspend/resume and fix spindown on poweroff.  As Robert pointed out in
the other thread[1], sadly, ATA spec does NOT require cache flush on
standby and some distros don't flush cache prior to put the drive into
standby mode during shutdown.  This means that we can't skip cache flush
in the kernel shutdown path because data loss is possible.  Also, we
just can't switch to new method because there are drives which spin up
if told to spin down while it's already spun down.

So, that leaves us with migrating to new behavior (kernel side
sync/shutdown) while maintaining backward compatibility.  This patchset
tries to do that by supplying a scheduled-to-be-removed module parameter
libata.spindown_compat which defaults to 1.  When set, it makes libata
skip spindown during shutdown sequence thus maintaining the old behavior
of issuing only cache flush on shutdown.

So, distros should update their shutdown(8) to do the followings.

  * Check whether /sys/modules/libata/parameters/spindown_compat
exists.  If it does, write 0 to it.

  * For each libata harddisk {
* Check whether /sys/class/scsi_disk/h:c:i:l/manage_start_stop
  exists.  Iff it doesn't, synchronize cache and spin the disk
  down as before.
  }

If shutdown(8) does the above, nothing will change on older kernels
(some drives will spin up and have to do emergency unload but they
aren't too many) and everything should work properly on kernels with
spindown_compat or later ones which won't have it.  If shutdown(8) isn't
updated, the kernel will behave the same way as older kernels would.

To accelerate userland update, if shutdown(8) isn't updated
(spindown_compat not cleared), libata will complain loudly about it,
point the user to http://linux-ata.org/shutdown.html (which should be
written) and pause for 5 seconds during shutdown.  Hopefully, this makes
the users bug distros sufficiently so that userland tools can be updated
quickly.  Note that the pausing happens only during shutdown not during
reboot or suspend, so it shouldn't be too much of annoyance.

This change requires sdev->manage_start_stop updates from scsi-misc-2.6.
 The merged git tree can be found at...

  http://htj.dyndns.org/git/?p=libata-tj.git;a=shortlog;h=spindown
  git://htj.dyndns.org/libata-tj spindown

Thanks.

-- 
tejun

[1] http://thread.gmane.org/gmane.linux.ide/18167
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/2] libata: reimplement suspend/resume support using sdev->manage_start_stop

2007-05-04 Thread Tejun Heo
Reimplement suspend/resume support using sdev->manage_start_stop.

* Device suspend/resume is now SCSI layer's responsibility and the
  code is simplified a lot.

* DPM is dropped.  This also simplifies code a lot.  Suspend/resume
  status is port-wide now.

* ata_scsi_device_suspend/resume() and ata_dev_ready() removed.

* Resume now has to wait for disk to spin up before proceeding.  I
  couldn't find easy way out as libata is in EH waiting for the
  disk to be ready and sd is waiting for EH to complete to issue
  START_STOP.

* sdev->manage_start_stop is set to 1 in ata_scsi_slave_config().
  This fixes spindown on shutdown and suspend-to-disk.

Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>
---
 drivers/ata/ahci.c  |4 -
 drivers/ata/ata_generic.c   |6 +-
 drivers/ata/ata_piix.c  |4 -
 drivers/ata/libata-core.c   |   39 +--
 drivers/ata/libata-eh.c |  237 +--
 drivers/ata/libata-scsi.c   |  129 +-
 drivers/ata/pata_ali.c  |4 -
 drivers/ata/pata_amd.c  |4 -
 drivers/ata/pata_atiixp.c   |4 -
 drivers/ata/pata_cmd640.c   |4 -
 drivers/ata/pata_cmd64x.c   |4 -
 drivers/ata/pata_cs5520.c   |4 -
 drivers/ata/pata_cs5530.c   |4 -
 drivers/ata/pata_cs5535.c   |4 -
 drivers/ata/pata_cypress.c  |4 -
 drivers/ata/pata_efar.c |4 -
 drivers/ata/pata_hpt366.c   |4 -
 drivers/ata/pata_hpt3x3.c   |4 -
 drivers/ata/pata_it8213.c   |4 -
 drivers/ata/pata_it821x.c   |4 -
 drivers/ata/pata_ixp4xx_cf.c|2 +-
 drivers/ata/pata_jmicron.c  |4 -
 drivers/ata/pata_marvell.c  |4 -
 drivers/ata/pata_mpc52xx.c  |4 -
 drivers/ata/pata_mpiix.c|4 -
 drivers/ata/pata_netcell.c  |4 -
 drivers/ata/pata_ns87410.c  |4 -
 drivers/ata/pata_oldpiix.c  |4 -
 drivers/ata/pata_opti.c |4 -
 drivers/ata/pata_optidma.c  |4 -
 drivers/ata/pata_pdc202xx_old.c |4 -
 drivers/ata/pata_radisys.c  |4 -
 drivers/ata/pata_rz1000.c   |6 +-
 drivers/ata/pata_sc1200.c   |4 -
 drivers/ata/pata_scc.c  |4 -
 drivers/ata/pata_serverworks.c  |4 -
 drivers/ata/pata_sil680.c   |4 -
 drivers/ata/pata_sis.c  |4 -
 drivers/ata/pata_triflex.c  |4 -
 drivers/ata/pata_via.c  |4 -
 drivers/ata/sata_inic162x.c |4 -
 drivers/ata/sata_nv.c   |8 --
 drivers/ata/sata_sil.c  |4 -
 drivers/ata/sata_sil24.c|4 -
 include/linux/libata.h  |   14 +--
 45 files changed, 14 insertions(+), 575 deletions(-)

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 34c5534..d730291 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -250,10 +250,6 @@ static struct scsi_host_template ahci_sh
.slave_configure= ata_scsi_slave_config,
.slave_destroy  = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param,
-#ifdef CONFIG_PM
-   .suspend= ata_scsi_device_suspend,
-   .resume = ata_scsi_device_resume,
-#endif
 };
 
 static const struct ata_port_operations ahci_ops = {
diff --git a/drivers/ata/ata_generic.c b/drivers/ata/ata_generic.c
index 92a491d..0f19e32 100644
--- a/drivers/ata/ata_generic.c
+++ b/drivers/ata/ata_generic.c
@@ -54,7 +54,7 @@ static int generic_set_mode(struct ata_p
 
for (i = 0; i < ATA_MAX_DEVICES; i++) {
struct ata_device *dev = &ap->device[i];
-   if (ata_dev_ready(dev)) {
+   if (ata_dev_enabled(dev)) {
/* We don't really care */
dev->pio_mode = XFER_PIO_0;
dev->dma_mode = XFER_MW_DMA_0;
@@ -90,10 +90,6 @@ static struct scsi_host_template generic
.slave_configure= ata_scsi_slave_config,
.slave_destroy  = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param,
-#ifdef CONFIG_PM
-   .resume = ata_scsi_device_resume,
-   .suspend= ata_scsi_device_suspend,
-#endif
 };
 
 static struct ata_port_operations generic_port_ops = {
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 55d306a..8421742 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -275,10 +275,6 @@ static struct scsi_host_template piix_sh
.slave_configure= ata_scsi_slave_config,
.slave_destroy  = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param,
-#ifdef CONFIG_PM
-   .resume = ata_scsi_device_resume,
-   .suspend= ata_scsi_device_suspend,
-#endif
 };
 
 static const struct ata_port_operations piix_pata_ops = {
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index ca67484..ce5e080 100644
--- a/drivers/ata/li

[PATCH 2/2] libata: implement libata.spindown_compat

2007-05-04 Thread Tejun Heo
Now that libata uses sd->manage_start_stop, libata spins down disk on
shutdown.  In an attempt to compensate libata's previous shortcoming,
some distros sync and spin down disks attached via libata in their
shutdown(8).  Some disks spin back up just to spin down again on
STANDBYNOW1 if the command is issued when the disk is spun down, so
this double spinning down causes problem.

This patch implements module parameter libata.spindown_compat which,
when set to one (default value), prevents libata from spinning down
disks on shutdown thus avoiding double spinning down.  Note that
libata spins down disks for suspend to mem and disk, so with
libata.spindown_compat set to one, disks should be properly spun down
in all cases without modifying shutdown(8).

shutdown(8) should be fixed eventually.  Some drive do spin up on
SYNCHRONZE_CACHE even when their cache is clean.  Those disks
currently spin up briefly when sd tries to shutdown the device and
then the machine powers off immediately, which can't be good for the
head.  We can't skip SYNCHRONIZE_CACHE during shudown as it can be
dangerous data integrity-wise.

So, this spindown_compat parameter is already scheduled for removal by
the end of the next year and here's what shutdown(8) should do.

  * Check whether /sys/modules/libata/parameters/spindown_compat
exists.  If it does, write 0 to it.

  * For each libata harddisk {
* Check whether /sys/class/scsi_disk/h:c:i:l/manage_start_stop
  exists.  Iff it doesn't, synchronize cache and spin the disk
  down as before.
  }

The above procedure will make shutdown(8) work properly with kernels
before this change, ones with this workaround and later ones without
it.

To accelerate shutdown(8) updates, if the compat mode is in use, this
patch prints BIG FAT warning for five seconds during shutdown (the
optimal interval to annoy the user just the right amount discovered by
hours of tireless usability testing).

Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>
---
 Documentation/feature-removal-schedule.txt |   19 +++
 drivers/ata/libata-core.c  |6 ++
 drivers/ata/libata-scsi.c  |   28 +++-
 drivers/ata/libata.h   |1 +
 4 files changed, 53 insertions(+), 1 deletions(-)

diff --git a/Documentation/feature-removal-schedule.txt 
b/Documentation/feature-removal-schedule.txt
index 5c88ba1..78b3aa6 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -314,3 +314,22 @@ Why:   Code was merged, then submitter imm
 Who:   David S. Miller <[EMAIL PROTECTED]>
 
 ---
+
+What:  libata.spindown_compat module parameter
+When:  Dec 2008
+Why:   halt(8) synchronizes caches for and spins down libata disks
+   because libata didn't use to spin down disk on system halt
+   (only synchronized caches).
+   Spin down on system halt is now implemented and can be tested
+   using sysfs node /sys/class/scsi_disk/h:c:i:l/manage_start_stop.
+   Because issuing spin down command to an already spun down disk
+   makes some disks spin up just to spin down again, the old
+   behavior needs to be maintained till userspace tool is updated
+   to check the sysfs node and not to spin down disks with the
+   node set to one.
+   This module parameter is to give userspace tool the time to
+   get updated and should be removed after userspace is
+   reasonably updated.
+Who:   Tejun Heo <[EMAIL PROTECTED]>
+
+---
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index ce5e080..4a81549 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -101,6 +101,12 @@ int libata_noacpi = 1;
 module_param_named(noacpi, libata_noacpi, int, 0444);
 MODULE_PARM_DESC(noacpi, "Disables the use of ACPI in suspend/resume when 
set");
 
+int ata_spindown_compat = 1;
+module_param_named(spindown_compat, ata_spindown_compat, int, 0644);
+MODULE_PARM_DESC(spindown_compat, "Enable backward compatible spindown "
+"behavior.  Will be removed.  More info can be found in "
+"Documentation/feature-removal-schedule.txt\n");
+
 MODULE_AUTHOR("Jeff Garzik");
 MODULE_DESCRIPTION("Library module for ATA devices");
 MODULE_LICENSE("GPL");
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 8f80019..dd81fa7 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -944,9 +944,35 @@ static unsigned int ata_scsi_start_stop_
}
 
tf->command = ATA_CMD_VERIFY;   /* READ VERIFY */
-   } else
+   } else {
+   /* XXX: This is for backward compatibility, will be
+* removed.  Read Documentation/feature-removal-schedule.txt
+* for more info.
+*/
+   if (ata_spindown_compat &&
+   (system_state == SYS

Re: SATA SB600 works in 2.6.20.4 but not in 2.6.21-rc5 with irqpoll parameter

2007-05-04 Thread Matí­as Alejandro Torres



Well, making it work without pci=nomsi is the whole point here.  I dunno
why this simple thing doesn't work.  Can you post the result of 'lspci
-nn' so that we can see the numeric ID?
  
I would really like to know the answer to that, but i'm hundred of miles 
away. Attached to this email is the output of  lspci -nn .


Maybe you have the wrong id of the pci bridge:



00:02.0 PCI bridge [0604]: ATI Technologies Inc RS480 PCI-X Root Port 
[1002:5a34]


+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x5a3f, quirk_disable_msi); /* 
RS480 PCI bridge */


00:00.0 Host bridge [0600]: ATI Technologies Inc RS480 Host Bridge [1002:5950] 
(rev 10)
00:02.0 PCI bridge [0604]: ATI Technologies Inc RS480 PCI-X Root Port 
[1002:5a34]
00:12.0 SATA controller [0106]: ATI Technologies Inc SB600 Non-Raid-5 SATA 
[1002:4380]
00:13.0 USB Controller [0c03]: ATI Technologies Inc SB600 USB (OHCI0) 
[1002:4387]
00:13.1 USB Controller [0c03]: ATI Technologies Inc SB600 USB (OHCI1) 
[1002:4388]
00:13.2 USB Controller [0c03]: ATI Technologies Inc SB600 USB (OHCI2) 
[1002:4389]
00:13.3 USB Controller [0c03]: ATI Technologies Inc SB600 USB (OHCI3) 
[1002:438a]
00:13.4 USB Controller [0c03]: ATI Technologies Inc SB600 USB (OHCI4) 
[1002:438b]
00:13.5 USB Controller [0c03]: ATI Technologies Inc SB600 USB Controller (EHCI) 
[1002:4386]
00:14.0 SMBus [0c05]: ATI Technologies Inc SB600 SMBus [1002:4385] (rev 13)
00:14.1 IDE interface [0101]: ATI Technologies Inc SB600 IDE [1002:438c]
00:14.2 Audio device [0403]: ATI Technologies Inc SB600 Azalia [1002:4383]
00:14.3 ISA bridge [0601]: ATI Technologies Inc SB600 PCI to LPC Bridge 
[1002:438d]
00:14.4 PCI bridge [0604]: ATI Technologies Inc SB600 PCI to PCI Bridge 
[1002:4384]
00:18.0 Host bridge [0600]: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] 
HyperTransport Technology Configuration [1022:1100]
00:18.1 Host bridge [0600]: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] 
Address Map [1022:1101]
00:18.2 Host bridge [0600]: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] 
DRAM Controller [1022:1102]
00:18.3 Host bridge [0600]: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] 
Miscellaneous Control [1022:1103]
01:00.0 VGA compatible controller [0300]: nVidia Corporation G71 [GeForce 7300 
GS] [10de:01df] (rev a1)
02:06.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. 
RTL-8110SC/8169SC Gigabit Ethernet [10ec:8167] (rev 10)


Re: SATA SB600 works in 2.6.20.4 but not in 2.6.21-rc5 with irqpoll parameter

2007-05-04 Thread Tejun Heo
Matí­as Alejandro Torres wrote:
> 
>> Well, making it work without pci=nomsi is the whole point here.  I dunno
>> why this simple thing doesn't work.  Can you post the result of 'lspci
>> -nn' so that we can see the numeric ID?
>>   
> I would really like to know the answer to that, but i'm hundred of miles
> away. Attached to this email is the output of  lspci -nn .
> 
> Maybe you have the wrong id of the pci bridge:
> 
> 00:02.0 PCI bridge [0604]: ATI Technologies Inc RS480 PCI-X Root Port
> [1002:5a34]
> 
> +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x5a3f, quirk_disable_msi);
> /* RS480 PCI bridge */

Yeah, apparently.

00:02.0 PCI bridge [0604]: ATI Technologies Inc RS480 PCI-X Root Port
[1002:5a34]

So, there are two broken PCI bridges.  Argh  Okay, please try the
attached patch.  It includes both 5a34 and 5a3f.

Thanks for your patience.

-- 
tejun
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 3411483..b0e89db 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -1648,6 +1648,8 @@ static void __devinit quirk_disable_msi(
}
 }
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, 
quirk_disable_msi);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x5a34, quirk_disable_msi); /* 
RS480 PCI-X root port */
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x5a3f, quirk_disable_msi); /* 
RS480 PCI bridge */
 
 /* Go through the list of Hypertransport capabilities and
  * return 1 if a HT MSI capability is found and enabled */


Re: [patch 0/7] Asynchronous Notification for ATAPI devices (v2) - resend

2007-05-04 Thread James Bottomley
On Fri, 2007-05-04 at 11:12 -0700, Kristen Carlson Accardi wrote:
> This patch series implements Asynchronous Notification (AN) for SATA
> ATAPI devices as defined in SATA 2.5 and AHCI 1.1 and higher.  Drives
> which support this feature will send a notification when new media is
> inserted and removed, preventing the need for user space to poll for
> new media.  This support is exposed to user space via a flag that will
> be set in /sys/block/sr*/capability_flags.  If the flag is set, user
> space can disable polling for the new media, and the genhd driver will
> send a KOBJ_CHANGE event with the envp set to MEDIA_CHANGE_EVENT=1.
> 
> Note that this patch only implements support for directly attached
> drives - AN with drives attached to a port multiplier requires 
> additional changes.

I seem to remember when this came up before, the observation was made
that AENs occur for many more things than simple media change notices,
so we should probably have a more generic AEN handling mechanism.  Is
there any plan to move in this direction

James



-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 6/7] SCSI: save disk in scsi_device - resend

2007-05-04 Thread James Bottomley
On Fri, 2007-05-04 at 11:17 -0700, Kristen Carlson Accardi wrote:
> Give anyone who has access to scsi_device access to the genhd struct as well.
> 
> Signed-off-by: Kristen Carlson Accardi <[EMAIL PROTECTED]>
> Index: 2.6-git/drivers/scsi/sd.c
> ===
> --- 2.6-git.orig/drivers/scsi/sd.c
> +++ 2.6-git/drivers/scsi/sd.c
> @@ -1711,6 +1711,7 @@ static int sd_probe(struct device *dev)
>  
>   dev_set_drvdata(dev, sdkp);
>   add_disk(gd);
> + sdp->disk = gd;
>  
>   sdev_printk(KERN_NOTICE, sdp, "Attached scsi %sdisk %s\n",
>   sdp->removable ? "removable " : "", gd->disk_name);
> Index: 2.6-git/drivers/scsi/sr.c
> ===
> --- 2.6-git.orig/drivers/scsi/sr.c
> +++ 2.6-git/drivers/scsi/sr.c
> @@ -604,6 +604,7 @@ static int sr_probe(struct device *dev)
>   if (sdev->media_change_notify)
>   disk->flags |= GENHD_FL_MEDIA_CHANGE_NOTIFY;
>   add_disk(disk);
> + sdev->disk = disk;
>  
>   sdev_printk(KERN_DEBUG, sdev,
>   "Attached scsi CD-ROM %s\n", cd->cdi.name);
> Index: 2.6-git/include/scsi/scsi_device.h
> ===
> --- 2.6-git.orig/include/scsi/scsi_device.h
> +++ 2.6-git/include/scsi/scsi_device.h
> @@ -138,7 +138,7 @@ struct scsi_device {
>  
>   struct device   sdev_gendev;
>   struct class_device sdev_classdev;
> -
> + struct gendisk  *disk;
>   struct execute_work ew; /* used to get process context on put */
>  
>   enum scsi_device_state sdev_state;

If you're going to do this, you need to take on board removing the
struct gendisk from all the ULD structures (since it's now become
generic).

James


-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 0/7] Asynchronous Notification for ATAPI devices (v2) - resend

2007-05-04 Thread Kristen Carlson Accardi
On Fri, 04 May 2007 15:30:03 -0500
James Bottomley <[EMAIL PROTECTED]> wrote:

> On Fri, 2007-05-04 at 11:12 -0700, Kristen Carlson Accardi wrote:
> > This patch series implements Asynchronous Notification (AN) for SATA
> > ATAPI devices as defined in SATA 2.5 and AHCI 1.1 and higher.  Drives
> > which support this feature will send a notification when new media is
> > inserted and removed, preventing the need for user space to poll for
> > new media.  This support is exposed to user space via a flag that will
> > be set in /sys/block/sr*/capability_flags.  If the flag is set, user
> > space can disable polling for the new media, and the genhd driver will
> > send a KOBJ_CHANGE event with the envp set to MEDIA_CHANGE_EVENT=1.
> > 
> > Note that this patch only implements support for directly attached
> > drives - AN with drives attached to a port multiplier requires 
> > additional changes.
> 
> I seem to remember when this came up before, the observation was made
> that AENs occur for many more things than simple media change notices,
> so we should probably have a more generic AEN handling mechanism.  Is
> there any plan to move in this direction
> 
> James
> 
In this implementation, we use kobject_uevent_env (vs. just 
kobject_uevent in the original implementation) to send a KOBJ_CHANGE
with the enviroment value of MEDIA_CHANGE=1.  For other asynchronous
events, you could still use KOBJ_CHANGE with a different env value.
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Data corruption with sata_sil (Sil 3112)

2007-05-04 Thread Jim Paris
> I've been having problems with Sil 3112 cards I purchased for additional
> SATA ports resulting in read data corruption, about 3-5 instances over
> 2 GB of data, 100% reproducible.
..
> I just rebuilt the entire box with the remains of another (went from
> A7V8X (VIA) to A7N8X (NVidia), new CPU, new RAM, new power supply),
> thinking the problem was related to the motherboard.  The issue followed
> to the new box.

Have you tried different disks?  I recently spent a long time trying
to track down the same sort of problem and it ended up being a bad
HD (not a media failure, so SMART didn't report it).

> This new motherboard has an onboard Sil 3112 as well.  The old onboard
> was VIA SATA, which did not corrupt anything.  The Sil 3112 onboard now
> does too.

Maybe the VIA controller was only 1.5 Gbps and your 3112 controllers
are running at 3.0 Gbps?  Some drives have a jumper that lets you
limit their operation to 1.5, which you could try.

> Scipt used to md5sum to find corruption:
> 
>   find $* -type f -print0 | sort -z | xargs -0 md5sum

Can you figure out the nature of the corruption?  Flipped bit, entire
blocks corrupted, etc?  Maybe make two big identical files and use
"cmp -l" to see how they read differently.

-jim

-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html