Re: [PATCH 2.6.22-rc4] libata: SiS180 pata support

2007-06-29 Thread Jeff Garzik

Uwe Koziolek wrote:

Jeff Garzik wrote:
  

Jeff,
Did you have added  the patch you have  mailed on 06.06. anywhere or is
this patch an email only patch. And how to continue?

It's in my mbox queue, should be in my next run... :)

Jeff


I have 3 fixes that i want to add on top
- a compilation fix for your fix
- an additional PCI-ID
- a changed handling for SATA-devices in IDE-emulation mode, this fixes
issues for the SiS968

I have submitted these fixes 2 times in a single patch, but i can also
split the three fixes in separate patches
if wanted.


Easiest for me would be three separate patches (after which I can 
combine the first with the existing patch in my mbox).


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: [patch 2.6.22-rc6] ATA: add a PCI ID for Intel Santa Rosa PATA controller

2007-06-29 Thread Jeff Garzik

Chuck Ebbert wrote:

On 06/28/2007 03:16 PM, Chuck Ebbert wrote:

[Forgot to mark subj: as a patch; attached]


Sorry, using attachments (a) decreases reviewers and (b) makes your 
patch HARDER to apply.  See #7 under Documentation/SubmittingPatches.


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: [1/2] 2.6.22-rc6: known regressions v2

2007-06-29 Thread Jeff Garzik

Alan Cox wrote:

I'm not even sure this report is IT8212 related rather than just an IRQ
storm

Why does the driver report irq 0?

ata7: PATA max UDMA/133 cmd blah ctl blah bmdma blah irq 0  

Above that, the ACPI layer says it assigned IRQ 20


Because the libata core code in 2.6.22rc6 reports all the ports and IRQ
values wrongly ?


AFAIK that was fixed, for IRQ.  Please point out examples where it 
remains broken...


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: [1/2] 2.6.22-rc6: known regressions v2

2007-06-29 Thread Jeff Garzik

Alan Cox wrote:

On Fri, 29 Jun 2007 14:10:49 -0400
Jeff Garzik [EMAIL PROTECTED] wrote:


Alan Cox wrote:

I'm not even sure this report is IT8212 related rather than just an IRQ
storm

Why does the driver report irq 0?

ata7: PATA max UDMA/133 cmd blah ctl blah bmdma blah irq 0  

Above that, the ACPI layer says it assigned IRQ 20

Because the libata core code in 2.6.22rc6 reports all the ports and IRQ
values wrongly ?
AFAIK that was fixed, for IRQ.  Please point out examples where it 
remains broken...


2.6.22-rc6 it is broken, for all the systems I've looked at, as are the
port numbers. Tejun posted fixes for the IRQ but they do not seem to have
been applied, or if they were it was post -rc6 to a git tree.



I've seen the patch that eventually became 
22888423b3b1b96573250671afb5b72ea4364902 from Olof Johansson but nothing 
from Tejun on the subject.


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: [PATCH 13/15] ide: add ata_set{_max}_pio()

2007-06-30 Thread Jeff Garzik

Bartlomiej Zolnierkiewicz wrote:

* Add IDE_HFLAG_ABUSE_{PREFETCH,FAST_DEVSEL,DMA_MODES} flags
  and set them in ht6560, cmd640, cmd64x and sc1200 host drivers.

* Add set_pio_mode_abuse() for checking if host driver has a non-standard
  -tuneproc() implementation and use it in do_special().

* Add ata_set_pio() for setting PIO mode (it uses hwif-pio_mask to find
  the maximum PIO mode supported by the host), also add ata_set_max_pio()
  wrapper for ata_set_pio() to use for auto-tuning.  Convert users of
  -tuneproc to use ata_set{_max}_pio() where possible.  This leaves only
  do_special(), set_using_pio(), ide_hwif_restore() and ata_set_pio() as
  a direct users of -tuneproc.

* Remove no longer needed ide_get_best_pio_mode() calls and printk-s
  reporting PIO mode selected from -tuneproc implementations.

* Rename -tuneproc hook to -set_pio_mode and make 'pio' argument const.

* Remove stale comment from ide_config_drive_speed().

Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]


It seems highly inconsistent for drivers/ide to use the ide_ prefix 
the vast majority of the time, but then ata_ prefix in this one case, 
particularly when libata uses the ata_ prefix almost exclusively.


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: [PATCH 9/15] ide: add PIO masks

2007-06-30 Thread Jeff Garzik

Bartlomiej Zolnierkiewicz wrote:

* Add ATA_PIO[0-6] defines to linux/ata.h.


ACK


-
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/15] ide: add ata_pio_cycle_time() helper

2007-06-30 Thread Jeff Garzik

Bartlomiej Zolnierkiewicz wrote:

* Add ata_pio_cycle_time() helper.


ditto previous comment about highly inconsistent prefix usage


-
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/ADMA TIMEOUTS, dmesg output

2007-06-30 Thread Jeff Garzik

Charles Shannon Hendrix wrote:



Following this post is output from Linux kernel 2.6.21 showing ADMA 
timeouts.


2.6.21 has improved the situation over earlier kernels, but the problems 
do still occur.


nforce4 chipset, Seagate Barracuda SATA drives.

This is meant mainly as an additional data point in case it helps 
someone debug the problem.


Does setting 'adma' module option to zero fix things?

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: [PATCH 13/15] ide: add ata_set{_max}_pio()

2007-06-30 Thread Jeff Garzik

Bartlomiej Zolnierkiewicz wrote:

This has been changing recently since ide_ prefix seems to have
negative emotional connotations. :-)

New patches for drivers/ide should use exclusively the ata_ prefix.


So this choice to be inconsistent was made based entirely on fashion?

This is the same as using a different coding style in one area of the 
IDE driver, when the rest of the IDE driver uses another coding style.


It violates the Principle of Least Surprise.

I cannot see any harm in continuing to use the prefix the IDE driver has 
been using for over a decade, while I can see how inconsistency




particularly when libata uses the ata_ prefix almost exclusively.


I don't see *any* problem with this since libata exists in the separate
directory and the amount of code shared between libata and drivers/ide
equals *zero* (not counting linux/ata.h containing defines etc).


There are many opportunities for confusion:  global grep.  oops traces. 
 General reviewer expectations (oooh, I grepped for ide_xxx because 
thats what all the functions use, except for this ONE function that's 
different)


You are living in a global namespace.  Directories are irrelevant.

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: device error via SDB FIS

2007-06-30 Thread Jeff Garzik

Daniel Schroeder wrote:

hello list,

i do not know, what this could mean, but i have never seen it before.
System is 2.6.22-rc6, sil3132, samsung hd501lj (new hd under 10 power on 
hours)


time line:
1: power on (single esata enclosure)
2: system recognizes and configures the disk
3: mount disk
4: use disk
5: device error via SDB FIS
6: mount is still there, everything looks good except of this entry in logs

quote
ata3: exception Emask 0x10 SAct 0x0 SErr 0x8 action 0x2 frozen
ata3: (irq_stat 0x01140010, PHY RDY changed)
ata3: soft resetting port
ata3: SATA link down (SStatus 0 SControl 300)
ata3: EH complete
ata3: exception Emask 0x10 SAct 0x0 SErr 0x0 action 0x2 frozen
ata3: (irq_stat 0x00b00090, PHY RDY changed)
ata3: soft resetting port
ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata3.00: ata_hpa_resize 1: sectors = 976773168, hpa_sectors = 976773168
ata3.00: ATA-8: SAMSUNG HD501LJ, CR100-10, max UDMA7
ata3.00: 976773168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata3.00: ata_hpa_resize 1: sectors = 976773168, hpa_sectors = 976773168
ata3.00: configured for UDMA/100
ata3: EH complete
scsi 2:0:0:0: Direct-Access ATA  SAMSUNG HD501LJ  CR10 PQ: 0 
ANSI: 5

sd 2:0:0:0: [sdc] 976773168 512-byte hardware sectors (500108 MB)
sd 2:0:0:0: [sdc] Write Protect is off
sd 2:0:0:0: [sdc] Mode Sense: 00 3a 00 00
sd 2:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't 
support DPO or FUA

sd 2:0:0:0: [sdc] 976773168 512-byte hardware sectors (500108 MB)
sd 2:0:0:0: [sdc] Write Protect is off
sd 2:0:0:0: [sdc] Mode Sense: 00 3a 00 00
sd 2:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't 
support DPO or FUA

sdc: sdc1
sd 2:0:0:0: [sdc] Attached SCSI disk
sd 2:0:0:0: Attached scsi generic sg2 type 0
kjournald starting.  Commit interval 5 seconds
EXT3 FS on dm-4, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
ata3.00: exception Emask 0x0 SAct 0x2ef SErr 0x0 action 0x0
ata3.00: (irq_stat 0x00020002, device error via SDB FIS)
ata3.00: cmd 61/28:30:17:83:68/00:00:1f:00:00/40 tag 6 cdb 0x0 data 
20480 out

res 51/04:30:17:83:68/50:04:1f:00:00/40 Emask 0x1 (device error)


Command 0x61 is FPDMA WRITE (NCQ WRITE).

Error 0x04 is 'command aborted'.

Not much the driver can do but follow what the device is telling us...

If you disable NCQ, presumably this should go away.

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: device error via SDB FIS

2007-06-30 Thread Jeff Garzik

Daniel Schroeder wrote:



ata3.00: exception Emask 0x0 SAct 0x2ef SErr 0x0 action 0x0
ata3.00: (irq_stat 0x00020002, device error via SDB FIS)
ata3.00: cmd 61/28:30:17:83:68/00:00:1f:00:00/40 tag 6 cdb 0x0 data 
20480 out

res 51/04:30:17:83:68/50:04:1f:00:00/40 Emask 0x1 (device error)


Command 0x61 is FPDMA WRITE (NCQ WRITE).

Error 0x04 is 'command aborted'.

Not much the driver can do but follow what the device is telling us...

If you disable NCQ, presumably this should go away.


thanks for your explanation, i will monitor this drive and disable ncq 
if it happens again



I should have added:  given your report, it sounds like the error 
handling code took appropriate action for your error.  It should 
continue transferring data (though perhaps not in NCQ mode anymore). 
HOPEFULLY all you see is a nasty message when the drive complains :)


If that is not the case, if you are seeing data transfer suddenly cease 
(or worse, data corruption) please do speak up...


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: [PATCH] ide: add ide_set{_max}_pio() (take 2)

2007-06-30 Thread Jeff Garzik

Bartlomiej Zolnierkiewicz wrote:

* Add IDE_HFLAG_ABUSE_{PREFETCH,FAST_DEVSEL,DMA_MODES} flags
  and set them in ht6560, cmd640, cmd64x and sc1200 host drivers.

* Add set_pio_mode_abuse() for checking if host driver has a non-standard
  -tuneproc() implementation and use it in do_special().

* Add ide_set_pio() for setting PIO mode (it uses hwif-pio_mask to find
  the maximum PIO mode supported by the host), also add ide_set_max_pio()
  wrapper for ide_set_pio() to use for auto-tuning.  Convert users of
  -tuneproc to use ide_set{_max}_pio() where possible.  This leaves only
  do_special(), set_using_pio(), ide_hwif_restore() and ide_set_pio() as
  a direct users of -tuneproc.

* Remove no longer needed ide_get_best_pio_mode() calls and printk-s
  reporting PIO mode selected from -tuneproc implementations.

* Rename -tuneproc hook to -set_pio_mode and make 'pio' argument const.

* Remove stale comment from ide_config_drive_speed().

v2:
* Fix ata_ prefix (Noticed by Jeff).

Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
Cc: Jeff Garzik [EMAIL PROTECTED]


Thanks Bart!

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: [PATCH 2.6.22-rc6] add PCI-ID for Adaptec 1430SA 4-Port SATA Controller

2007-07-02 Thread Jeff Garzik

Florian Attenberger wrote:

Hi,

added this pci id to support my:
lspci:
01:00.0 RAID bus controller: Adaptec Unknown device 0243 (rev 02)
lspci -n:
01:00.0 0104: 9005:0243 (rev 02)

seems to work fine.

florian attenberger


--- 2.6.22-rc6/drivers/ata/sata_mv.c2007-06-30 16:21:47.462020256 +0200
+++ 2.6.22-rc6.mine/drivers/ata/sata_mv.c   2007-06-30 16:25:25.999165444 
+0200
@@ -582,6 +582,9 @@ static const struct pci_device_id mv_pci
 
 	{ PCI_VDEVICE(ADAPTEC2, 0x0241), chip_604x },
 
+	/* Adaptec 1430SA */

+   { PCI_VDEVICE(ADAPTEC2, 0x0243), chip_7042 },
+
{ PCI_VDEVICE(TTI, 0x2310), chip_7042 },


Please do me a favor and resend with the Signed-off-by line as described 
by Documentation/SubmittingPatches and

http://linux.yyz.us/patch-format.html

Also, since your email is copied verbatim into the permanent kernel 
changelog, please remove all superfluous comments like Hi, and 
florian attenberger, or add a --- separator and move the comments 
after the separator.


-
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 2.6.22-rc6] libata: remove reading alt_status from ata_hsm_qc_complete()

2007-07-02 Thread Jeff Garzik

Albert Lee wrote:

In ata_hsm_qc_complete():
Calling ata_altstatus() after the qc is completed might race with next qc. 
Remove it.

Signed-off-by: Albert Lee [EMAIL PROTECTED]
---
Jeff,

(Sorry for re-submitting this patch so late.)
The unneeded reading of alt_status might cause trouble when another command 
doing activity like pio data xfer.
After checking, the flush here is leftover/merge damage of ata_pio_block( ) in 
2.6.17-rc5:
http://git.kernel.org/?p=linux/kernel/git/jgarzik/libata-dev.git;a=commitdiff;h=bb31a8faa270beafcc51a65880c5564c6b718bd6
We can safely remove it.


applied


-
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 1/1] libata: pata_pdc2027x PLL input clock fix

2007-07-02 Thread Jeff Garzik

Albert Lee wrote:

Recently the PLL input clock of pata_pdc2027x is sometimes detected
higer than expected (e.g. 20.027 MHz compared to 16.714 MHz).
It seems sometimes the mdelay() function is not as precise as it
used to be. Per Alan's advice, HT or power management might affect
the precision of mdelay().

This patch calls gettimeofday() to mesure the time elapsed and
calculate the PLL input clock accordingly.

Signed-off-by: Albert Lee [EMAIL PROTECTED]
Cc: Alan Cox [EMAIL PROTECTED]
---

Did more test. For mdelay(100) the usec_elapsed is usually 99287.
However, sometimes the usec_elapsed is 118934, longer than expected.

Jun 26 12:12:29 p4ht-s kernel: [ 9156.490991] ACPI: PCI Interrupt :02:05.0[A] - 
Link [LNK1] - GSI 10 (level, low) - IRQ 10
Jun 26 12:12:29 p4ht-s kernel: [ 9156.610175] usec_elapsed[118934]
Jun 26 12:12:29 p4ht-s kernel: [ 9156.610511] pata_pdc2027x :02:05.0: PLL 
input clock 16817 kHz

After the patch, the PLL input clock detected looks more accurate.
For your review, thanks.


applied


-
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_inic162x: disable LBA48 devices

2007-07-02 Thread Jeff Garzik

Tejun Heo wrote:

sata_inic162x can't do LBA48 properly yet and is likely to corrupt
data on drives larger than LBA28 limit.  Disable LBA48 devices during
device configuration.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
---
 drivers/ata/sata_inic162x.c |7 +++
 1 file changed, 7 insertions(+)

Index: work/drivers/ata/sata_inic162x.c
===
--- work.orig/drivers/ata/sata_inic162x.c
+++ work/drivers/ata/sata_inic162x.c
@@ -496,6 +496,13 @@ static void inic_dev_config(struct ata_d
/* inic can only handle upto LBA28 max sectors */
if (dev-max_sectors  ATA_MAX_SECTORS)
dev-max_sectors = ATA_MAX_SECTORS;
+
+   if (dev-n_sectors = 1  28) {
+   ata_dev_printk(dev, KERN_ERR,
+   ERROR: This driver doesn't support LBA48 yet and may cause\n
+   data corruption on such devices.  Disabling.\n);
+   ata_dev_disable(dev);
+   }


applied


-
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 -mm] sata_nv: allow changing queue depth

2007-07-02 Thread Jeff Garzik

Robert Hancock wrote:

The sata_nv driver was missing the change_queue_depth hook in the SCSI host
template which the other NCQ-capable libata drivers had. This made it impossible
to change the queue depth by user request. Add this in.

Signed-off-by: Robert Hancock [EMAIL PROTECTED]

--- linux-2.6.22-rc6-mm1/drivers/ata/sata_nv.c  2007-06-28 17:30:28.0 
-0600
+++ linux-2.6.22-rc6-mm1edit/drivers/ata/sata_nv.c  2007-06-28 
17:39:30.0 -0600
@@ -398,6 +398,7 @@ static struct scsi_host_template nv_adma
.name   = DRV_NAME,
.ioctl  = ata_scsi_ioctl,
.queuecommand   = ata_scsi_queuecmd,
+   .change_queue_depth = ata_scsi_change_queue_depth,
.can_queue  = NV_ADMA_MAX_CPBS,
.this_id= ATA_SHT_THIS_ID,
.sg_tablesize   = NV_ADMA_SGTBL_TOTAL_LEN,
@@ -416,6 +417,7 @@ static struct scsi_host_template nv_swnc
.name   = DRV_NAME,
.ioctl  = ata_scsi_ioctl,
.queuecommand   = ata_scsi_queuecmd,
+   .change_queue_depth = ata_scsi_change_queue_depth,
.can_queue  = ATA_MAX_QUEUE,
.this_id= ATA_SHT_THIS_ID,
.sg_tablesize   = LIBATA_MAX_PRD,


applied manually, patch didn't apply to 2.6.22-rc7


-
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 2.6.22-rc5] libata: add HTS541616J9SA00 to NCQ blacklist

2007-07-02 Thread Jeff Garzik

Tejun Heo wrote:

Another member of HTS5416* family doing spurious NCQ completion.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
Cc: Enrico Sardi [EMAIL PROTECTED]
---
 drivers/ata/libata-core.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index adfae9d..fbca8d8 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3803,6 +3803,7 @@ static const struct ata_blacklist_entry 
ata_device_blacklist [] = {
/* Drives which do spurious command completion */
{ HTS541680J9SA00,  SB2IC7EP,   ATA_HORKAGE_NONCQ, },
{ HTS541612J9SA00,  SBDIC7JP,   ATA_HORKAGE_NONCQ, },
+   { Hitachi HTS541616J9SA00, SB4OC70P, ATA_HORKAGE_NONCQ, },
{ WDC WD740ADFD-00NLR1, NULL,   ATA_HORKAGE_NONCQ, },


applied


-
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 2.6.22-rc4]: libata: PATA-mode fixes for sis_sata

2007-07-02 Thread Jeff Garzik

Uwe Koziolek wrote:

Changed PATA handler for PATA-ports used by sata_sis.
This patch was originally submitted by Jeff Garzik.

Added PCI-ID 1180 for SiS966 Controller in pata_sis.
The 1180 mode is fully compatible to other SiS PATA-controller.

The PCI-ID 1183 is SATA in PATA-emulation, but not fully compatible
to SiS5513/5518. sata_sis.c is forwarding this ID to pata_sis.
1183 is not working if simply added to pata_sis.
This handling fixes issues with SiS968.

Signed-off-by: Uwe Koziolek [EMAIL PROTECTED]


applied


-
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 2.6.22-rc6+mboxjeff 2/3] pata_sis: new PCI ID

2007-07-02 Thread Jeff Garzik

Uwe Koziolek wrote:

The SiS966 has an alternate PCI-ID 1180 for an IDE compatible controller
The primaty channel acts as PATA-controller, the secondary channel
acts as SATA-controller in PATA-emulation.

Signed-off-by: Uwe Koziolek [EMAIL PROTECTED]

--- a/drivers/ata/pata_sis.c2007-06-30 02:52:06.0 +0200
+++ b/drivers/ata/pata_sis.c2007-06-30 02:58:30.0 +0200
@@ -1016,6 +1016,7 @@
 static const struct pci_device_id sis_pci_tbl[] = {
{ PCI_VDEVICE(SI, 0x5513), },   /* SiS 5513 */
{ PCI_VDEVICE(SI, 0x5518), },   /* SiS 5518 */
+   { PCI_VDEVICE(SI, 0x1180), },   /* SiS 1180 */


patches 2 and 3 seem to already be included in the patch I just applied, 
so, ignored these...


Please wait a few hours (from the time of this email) and check 
libata-dev.git#upstream-fixes to make sure everything is in order.  It 
looks ok to me.


Thanks for your patience!

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


[git patches] libata fixes

2007-07-02 Thread Jeff Garzik

Please pull from 'upstream-linus' branch of
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git 
upstream-linus

to receive the following updates:

 drivers/ata/Kconfig |5 
 drivers/ata/libata-core.c   |3 +-
 drivers/ata/pata_pdc2027x.c |   11 -
 drivers/ata/pata_sis.c  |   46 +-
 drivers/ata/sata_inic162x.c |7 ++
 drivers/ata/sata_nv.c   |2 +
 drivers/ata/sata_sis.c  |   39 +--
 drivers/ata/sis.h   |2 +-
 drivers/scsi/Kconfig|1 +
 9 files changed, 89 insertions(+), 27 deletions(-)

Albert Lee (2):
  libata: pata_pdc2027x PLL input clock fix
  libata: remove reading alt_status from ata_hsm_qc_complete()

Randy Dunlap (1):
  scsi disk help file is not complete

Robert Hancock (1):
  sata_nv: allow changing queue depth

Tejun Heo (2):
  sata_inic162x: disable LBA48 devices
  libata: add HTS541616J9SA00 to NCQ blacklist

Uwe Koziolek (1):
  libata: PATA-mode fixes for sis_sata

diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index b4a8d60..4ad8675 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -16,6 +16,11 @@ menuconfig ATA
  that speaks the ATA protocol, also called ATA controller),
  because you will be asked for it.
 
+ NOTE: ATA enables basic SCSI support; *however*,
+ 'SCSI disk support', 'SCSI tape support', or
+ 'SCSI CDROM support' may also be needed,
+ depending on your hardware configuration.
+
 if ATA
 
 config ATA_NONSTANDARD
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index bfc59a1..2407f84 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3798,6 +3798,7 @@ static const struct ata_blacklist_entry 
ata_device_blacklist [] = {
/* Drives which do spurious command completion */
{ HTS541680J9SA00,SB2IC7EP, ATA_HORKAGE_NONCQ, },
{ HTS541612J9SA00,SBDIC7JP, ATA_HORKAGE_NONCQ, },
+   { Hitachi HTS541616J9SA00, SB4OC70P, ATA_HORKAGE_NONCQ, },
{ WDC WD740ADFD-00NLR1, NULL, ATA_HORKAGE_NONCQ, },
 
/* Devices with NCQ limits */
@@ -4781,8 +4782,6 @@ static void ata_hsm_qc_complete(struct ata_queued_cmd 
*qc, int in_wq)
} else
ata_qc_complete(qc);
}
-
-   ata_altstatus(ap); /* flush */
 }
 
 /**
diff --git a/drivers/ata/pata_pdc2027x.c b/drivers/ata/pata_pdc2027x.c
index 0d2cc49..69a5aa4 100644
--- a/drivers/ata/pata_pdc2027x.c
+++ b/drivers/ata/pata_pdc2027x.c
@@ -689,10 +689,12 @@ static long pdc_detect_pll_input_clock(struct ata_host 
*host)
void __iomem *mmio_base = host-iomap[PDC_MMIO_BAR];
u32 scr;
long start_count, end_count;
-   long pll_clock;
+   struct timeval start_time, end_time;
+   long pll_clock, usec_elapsed;
 
/* Read current counter value */
start_count = pdc_read_counter(host);
+   do_gettimeofday(start_time);
 
/* Start the test mode */
scr = readl(mmio_base + PDC_SYS_CTL);
@@ -705,6 +707,7 @@ static long pdc_detect_pll_input_clock(struct ata_host 
*host)
 
/* Read the counter values again */
end_count = pdc_read_counter(host);
+   do_gettimeofday(end_time);
 
/* Stop the test mode */
scr = readl(mmio_base + PDC_SYS_CTL);
@@ -713,7 +716,11 @@ static long pdc_detect_pll_input_clock(struct ata_host 
*host)
readl(mmio_base + PDC_SYS_CTL); /* flush */
 
/* calculate the input clock in Hz */
-   pll_clock = (start_count - end_count) * 10;
+   usec_elapsed = (end_time.tv_sec - start_time.tv_sec) * 100 +
+   (end_time.tv_usec - start_time.tv_usec);
+
+   pll_clock = (start_count - end_count) / 100 *
+   (1 / usec_elapsed);
 
PDPRINTK(start[%ld] end[%ld] \n, start_count, end_count);
PDPRINTK(PLL input clock[%ld]Hz\n, pll_clock);
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c
index ec3ae93..cfe4ec6 100644
--- a/drivers/ata/pata_sis.c
+++ b/drivers/ata/pata_sis.c
@@ -560,6 +560,40 @@ static const struct ata_port_operations sis_133_ops = {
.port_start = ata_port_start,
 };
 
+static const struct ata_port_operations sis_133_for_sata_ops = {
+   .port_disable   = ata_port_disable,
+   .set_piomode= sis_133_set_piomode,
+   .set_dmamode= sis_133_set_dmamode,
+   .mode_filter= ata_pci_default_filter,
+
+   .tf_load= ata_tf_load,
+   .tf_read= ata_tf_read,
+   .check_status   = ata_check_status,
+   .exec_command   = ata_exec_command,
+   .dev_select = ata_std_dev_select,
+
+   .freeze = ata_bmdma_freeze,
+   .thaw   = ata_bmdma_thaw,
+   .error_handler  = 

[info] What's in libata-dev.git?

2007-07-02 Thread Jeff Garzik


What follows are the changes contained in libata-dev.git, listed on a
branch-by-branch basis.  The double  lines separate each branch's
contents.  Each branch is accompanied by a 'STATUS' line, indicating the
upstream status of each branch.

I have patches from Alan (pata_sis FIFO whack, pata_dma option), Tejun,
Albert and Kristen still to be reviewed.  Will get to those on Friday,
after the July 4th US holiday.

Jeff




===
===

The following changes are found in the 'upstream' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git
(this is what is queued for 2.6.23 currently)

Alessandro Zummo (1):
  [libata] pata_ixp4xx: convert to new EH

Jeff Garzik (13):
  [libata] pata_atiixp: add SB700 PCI ID
  [libata] sata_sil: register table cleanup
  [libata] PATA drivers: remove ATA_FLAG_SRST
  [libata] drivers: remove 'void __iomem *' casts from pre-iomap days
  [libata] pdc_adma: Reorder initializers with a couple structs
  [libata] sata_sx4: named constant cleanup
  [libata] pata_sil680: minor cleanups from benh
  [libata] ahci: Factor out SATA port init into a separate function
  [libata] ahci: minor internal cleanups
  [libata] sata_sx4, sata_via: minor documentation updates
  [ATA] Add named constant for ATAPI command DEVICE RESET
  [libata] ahci: minor internal cleanups
  [libata] pata_ixp4xx: kill unused var

Jens Axboe (1):
  use_clustering (sht) bit set to 0 in AHCI ?

Tejun Heo (8):
  libata-acpi: implement ata_acpi_associate()
  libata-acpi: clean up ata_acpi_exec_tfs()
  libata-acpi: miscellaneous cleanups
  libata: reimplement ACPI invocation
  libata-acpi: remove redundant checks
  libata-acpi: implement _GTM/_STM support
  libata: replace ap-cbl tests with ATA_FLAG_SATA tests
  ata_piix: fix pio/mwdma programming

 drivers/ata/ahci.c  |  102 ++--
 drivers/ata/ata_generic.c   |2 
 drivers/ata/ata_piix.c  |   23 -
 drivers/ata/libata-acpi.c   |  914 +---
 drivers/ata/libata-core.c   |   25 -
 drivers/ata/libata-eh.c |   11 
 drivers/ata/libata.h|   18 
 drivers/ata/pata_ali.c  |   14 
 drivers/ata/pata_amd.c  |   20 
 drivers/ata/pata_artop.c|6 
 drivers/ata/pata_atiixp.c   |3 
 drivers/ata/pata_cmd640.c   |2 
 drivers/ata/pata_cmd64x.c   |   12 
 drivers/ata/pata_cs5530.c   |4 
 drivers/ata/pata_cs5535.c   |2 
 drivers/ata/pata_cypress.c  |2 
 drivers/ata/pata_efar.c |2 
 drivers/ata/pata_hpt366.c   |2 
 drivers/ata/pata_hpt37x.c   |   12 
 drivers/ata/pata_hpt3x2n.c  |2 
 drivers/ata/pata_hpt3x3.c   |2 
 drivers/ata/pata_icside.c   |2 
 drivers/ata/pata_it8213.c   |2 
 drivers/ata/pata_it821x.c   |4 
 drivers/ata/pata_ixp4xx_cf.c|   76 +--
 drivers/ata/pata_jmicron.c  |2 
 drivers/ata/pata_marvell.c  |4 
 drivers/ata/pata_netcell.c  |2 
 drivers/ata/pata_ns87410.c  |2 
 drivers/ata/pata_oldpiix.c  |2 
 drivers/ata/pata_opti.c |2 
 drivers/ata/pata_optidma.c  |4 
 drivers/ata/pata_pdc202xx_old.c |6 
 drivers/ata/pata_radisys.c  |2 
 drivers/ata/pata_rz1000.c   |2 
 drivers/ata/pata_sc1200.c   |2 
 drivers/ata/pata_serverworks.c  |8 
 drivers/ata/pata_sil680.c   |   17 
 drivers/ata/pata_sis.c  |   14 
 drivers/ata/pata_sl82c105.c |4 
 drivers/ata/pata_triflex.c  |2 
 drivers/ata/pdc_adma.c  |   18 
 drivers/ata/sata_inic162x.c |4 
 drivers/ata/sata_promise.c  |8 
 drivers/ata/sata_sil.c  |5 
 drivers/ata/sata_svw.c  |   11 
 drivers/ata/sata_sx4.c  |  166 ---
 drivers/ata/sata_via.c  |4 
 include/linux/ata.h |1 
 include/linux/libata.h  |   28 +
 50 files changed, 791 insertions(+), 793 deletions(-)

===
===

The following changes are found in the 'mv-ahci' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git

Jeff Garzik (2):
  [libata] AHCI: get Marvell SATA going (PATA portion of chip not supported)

 drivers/ata/ahci.c |   45 -
 2 files changed, 45 insertions(+), 2 deletions(-)

===
===

The following changes are found in the 'mv-eh' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git

Jeff Garzik

[info] What's in Jeff's libata-dev inbox?

2007-07-02 Thread Jeff Garzik

I have patches from Alan (pata_sis FIFO whack, pata_dma option), Tejun,
Albert and Kristen still to be reviewed.  Will get to those on Friday,
after the July 4th US holiday.tions(-)


Just to be more specific, my to-review inbox contains:

Alan: pata_sis FIFO whack, pata_dma option

Tejun: PMP patchbomb

Albert: irq_on/off restructure, irq-driven PIO to wq, minor PIO fixes

Kristen: ALPM

Mikael: sata_promise cleanup and hotplug

via akpm: HPA cleanup, cancel-rearming-wq cleanup

A few one-liner patches from Florian A, Boaz H, Christian L, Sonic Z, 
Jose A R.



NOTE to Kristen:  I am OK with your SATA async notification patches, as 
stated a while ago, but I think Andrew Morton had a better plan for 
merging that, so it's not in my queue.



Anything not on this list should be resent, I don't have it.

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: [PATCH 12/15] alim15x3: -speedproc, filter out invalid modes passed from user-space

2007-07-02 Thread Jeff Garzik

Bartlomiej Zolnierkiewicz wrote:

Add the new code inside #ifdef X86, marking alim15x3 X86-only would be
on over-kill...


Ugh.  That's not how we do Linux development.  It is better to convert 
the new code and wait for alpha/sparc users to scream, than add platform 
ifdefs.  To do so creates divergent code paths, that runs counter to 
Linux's goal of a portable driver.


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: [PATCH 12/15] alim15x3: -speedproc, filter out invalid modes passed from user-space

2007-07-02 Thread Jeff Garzik

Alan Cox wrote:
I am not ready to trust that pata_ali works as well as alim15x3 in all 
cases.  Someone should test e.g. Alpha AXP systems with IDE (use 
alim15x3) to make sure all is well.


My pata_ali is reported to do so. I don't know if yours does because my


Good to hear, thanks for the info.  Maybe we can get Al to give my old 
DS10 a try with pata_ali...


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


[git patch] fix the libata fix

2007-07-02 Thread Jeff Garzik

(this pulls everything in 'upstream-linus', too)

Please pull from the 'upstream-linus2' branch of
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git 
upstream-linus2

to receive the previously sent changes, and in addition, the following fix:

commit 531e3a61f55261bf466d0415c48999511334933c
Author: Jeff Garzik [EMAIL PROTECTED]
Date:   Mon Jul 2 18:12:19 2007 -0400

[libata] sata_nv: undo merge error

Only the ADMA entry was supposed to be able to change queue depth.

Signed-off-by: Jeff Garzik [EMAIL PROTECTED]

 drivers/ata/sata_nv.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index d53cb8c..b265686 100644
--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -307,7 +307,6 @@ static struct scsi_host_template nv_sht = {
.name   = DRV_NAME,
.ioctl  = ata_scsi_ioctl,
.queuecommand   = ata_scsi_queuecmd,
-   .change_queue_depth = ata_scsi_change_queue_depth,
.can_queue  = ATA_DEF_QUEUE,
.this_id= ATA_SHT_THIS_ID,
.sg_tablesize   = LIBATA_MAX_PRD,
-
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 2.6.22-rc7] libata: fix assigned IRQ reporting

2007-07-03 Thread Jeff Garzik

Tejun Heo wrote:

host-irq and host-irq2 should be set before ata_host_register() for
IRQ reporting to work.  Move up host-irq assignment in
ata_host_activate() and add it to ata_pci_init_one() native path and
pata_cs5520.

The port info printing in ata_host_register() doesn't fit all the
different controllers.  It should probably be moved out to LLDs with
some helpers in the future.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
---
 drivers/ata/libata-core.c |6 +++---
 drivers/ata/libata-sff.c  |5 +++--
 drivers/ata/pata_cs5520.c |5 +
 3 files changed, 11 insertions(+), 5 deletions(-)


applied


-
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 2.6.22-rc6] sata_mv: PCI-ID for Adaptec 1430SA SATA Controller

2007-07-03 Thread Jeff Garzik

Florian Attenberger wrote:

Signed-off-by: Florian Attenberger  [EMAIL PROTECTED]


--- 2.6.22-rc6/drivers/ata/sata_mv.c2007-06-30 16:21:47.462020256 +0200
+++ 2.6.22-rc6.mine/drivers/ata/sata_mv.c   2007-06-30 16:25:25.999165444 
+0200
@@ -582,6 +582,9 @@ static const struct pci_device_id mv_pci
 
 	{ PCI_VDEVICE(ADAPTEC2, 0x0241), chip_604x },
 
+	/* Adaptec 1430SA */

+   { PCI_VDEVICE(ADAPTEC2, 0x0243), chip_7042 },
+


applied


-
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: pata_ali patch not merged?

2007-07-03 Thread Jeff Garzik

Chuck Ebbert wrote:

This patch was found to fix some of the problems with the
pata_ali driver. Is it going to be merged in 2.6.22?

[https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=156482]


applied


-
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: Add support to Marvell 6121 in the mv-ahci-pata branch

2007-07-03 Thread Jeff Garzik

Jose Alberto Reguero wrote:

This patch add support to Marvell 6121.

Looking at the code I think that AHCI_FLAG_MV_PATA flag must be assigned to 
the PATA port.


Signed-off-by: Jose Alberto Reguero [EMAIL PROTECTED]


applied, 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


Re: [PATCH] libata: CONFIG_PM=n compile fix

2007-07-03 Thread Jeff Garzik

Olof Johansson wrote:

CONFIG_PM=n compile fix.

Signed-off-by: Olof Johansson [EMAIL PROTECTED]

---

Hi,

On Sat, May 26, 2007 at 11:09:54PM -0400, Jeff Garzik wrote:


This is checked into the 'mv-ahci-pata' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git


Didn't build for me without this change, since I had CONFIG_PM=n.


applied


-
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 2.6.22-rc7] sata_sil24: sil24_interrupt() micro-optimisation

2007-07-03 Thread Jeff Garzik

Mikael Pettersson wrote:

sil24_interrupt() loads host-ports[i] into a local variable,
validates it, and then loads the value again in the call to
sil24_host_intr(). This patch replaces the second load by a
reference to the local variable.

This is safe since no side-effects have occurred since the
initial load. It also improves readability since it makes
it clear that the parameter to sil24_host_intr() is the same
value which was just validated.

Signed-off-by: Mikael Pettersson [EMAIL PROTECTED]


applied


-
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: [ATA_PIIX] state of ICH8M PATA Support

2007-07-03 Thread Jeff Garzik

Chr wrote:

Hi,

I got a new laptop and I had a little problem that the DVD drive wasn't 
recognized by
libata's piix driver (but the old IDE Subsystem found it!!).

So, after adding the new pciid 8086:2850 it works!
But, I don't know if it's ich_pata_100 or ich_pata_133 since the 
dvd/cd drives only goes up to udma2 speeds.


Thanks,
Chr.


-
this patch adds a necessary PCIID for santa rosa's PATA controller.

Signed-off-by: Christian Lamparter [EMAIL PROTECTED]
-




--- ata_piix.c.org  2007-06-17 12:58:17.0 +0200
+++ ata_piix.c  2007-06-17 13:00:24.0 +0200
@@ -201,6 +201,8 @@ static const struct pci_device_id piix_p
/* ICH7/7-R (i945, i975) UDMA 100*/
{ 0x8086, 0x27DF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_133 },
{ 0x8086, 0x269E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
+   /* ICH8 Mobile PATA Controller */
+   { 0x8086, 0x2850, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },


applied


-
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 01/12] libata: update EH report formatting

2007-07-03 Thread Jeff Garzik

Tejun Heo wrote:

Update formatting for LLD provided error descriptions such that...

* No default () around it
* Each element is separated by  not ,

This change makes each element responsible for putting a space after
itself instead of before - e.g. elem  not , elem.  This is more
conventional and allows more flexible combination of messages.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]


either way, it is messy.

I guarantee that programmers are not going to remember always to add a 
magic space after certain error descriptions.  It is far, far better 
for the upper layer to help out a bit, and insert a space and/or comma 
for the LLDD.  After all, the LLDD might not be the only one printing 
error messages at that time; the upper layer might also wish to do so in 
the same dmesg line.



-
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 02/12] libata: implement AC_ERR_NCQ

2007-07-03 Thread Jeff Garzik

Tejun Heo wrote:

+++ b/include/linux/libata.h
@@ -322,7 +322,8 @@ enum ata_completion_errors {
AC_ERR_SYSTEM   = (1  6), /* system error */
AC_ERR_INVALID  = (1  7), /* invalid argument */
AC_ERR_OTHER= (1  8), /* unknown */
-   AC_ERR_NODEV_HINT   = (1  9), /* polling device detection hint */
+   AC_ERR_NCQ  = (1  9), /* marker for offending NCQ qc */
+   AC_ERR_NODEV_HINT   = (1  10), /* polling device detection hint */



patch is OK, except for the above very-minor flaw:  to remind, do not 
re-arrange bit numbers in the same patch you are adding bits.  it makes 
the patch more difficult to read.  Just add the new bit at the end.


If you wish to re-arrange the bits, do it in a separate patch (though I 
see no need for re-arranging)


-
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 03/12] libata: make -scr_read/write callbacks return error code

2007-07-03 Thread Jeff Garzik

Tejun Heo wrote:

Convert -scr_read/write callbacks to return error code to better
indicate failure.  This will help handling of SCR_NOTIFICATION.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]


ACK

but I do not look forward to merging this with #mv-eh :)
[my problem, not yours]


-
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 04/12] ahci: make NO_NCQ handling more consistent

2007-07-03 Thread Jeff Garzik

Tejun Heo wrote:

ahci_save_initial_config() is responsible for reading, screening the
host CAP register and storing the modified result into hpriv-cap for
the rest of the driver.  Move ATA_FLAG_NO_NCQ handling into
ahci_save_initial_config().  It's more consistent this way and the
rest of the driver can always refer to hpriv-cap to determine
configured capability.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
---
 drivers/ata/ahci.c |   10 --
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 0e001ad..0555db5 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -527,13 +527,19 @@ static void ahci_save_initial_config(struct pci_dev *pdev,
hpriv-saved_cap = cap = readl(mmio + HOST_CAP);
hpriv-saved_port_map = port_map = readl(mmio + HOST_PORTS_IMPL);
 
-	/* some chips lie about 64bit support */

+   /* some chips lie about their capabilities, bust them */
if ((cap  HOST_CAP_64)  (pi-flags  AHCI_FLAG_32BIT_ONLY)) {
dev_printk(KERN_INFO, pdev-dev,
   controller can't do 64bit DMA, forcing 32bit\n);
cap = ~HOST_CAP_64;
}
 
+	if ((cap  HOST_CAP_NCQ)  (pi-flags  AHCI_FLAG_NO_NCQ)) {

+   dev_printk(KERN_INFO, pdev-dev,
+  controller can't do NCQ, turning off CAP_NCQ\n);
+   cap = ~HOST_CAP_NCQ;
+   }


ACK, even though I dislike the manipulation of cap.

Your patch did not start this manipulation, as illustrated by 
AHCI_FLAG_32BIT_ONLY handling, but it is nonetheless a loss of 
information we may later come to regret.  I predict the creation of 
'original_cap' sometime in the distant future :)



-
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 10/12] libata: clear HOTPLUG flag after a reset

2007-07-03 Thread Jeff Garzik

Tejun Heo wrote:

ATA_EHI_HOTPLUGGED is a hint for reset functions indicating the the
port might have gone through hotplug/unplug just before entering EH.
Reset functions modify their behaviors a bit to handle the situation
better - e.g. using longer debouncing delay.

Currently, once HOTPLUG is set, it isn't cleared till the end of EH.
This is unnecessary and makes EH take longer.  Clear the HOTPLUGGED
flag after a reset try (successful or not).

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
---
 drivers/ata/libata-eh.c |   15 ++-
 1 files changed, 10 insertions(+), 5 deletions(-)


ACK patches 6-10


-
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 11/12] libata: schedule probing after SError access failure during autopsy

2007-07-03 Thread Jeff Garzik

Tejun Heo wrote:

If SError isn't accessible, EH can't tell whether hotplug has happened
or not.  Report SError read failure with AC_ERR_OTHER and schedule
probing with hardreset.  This will be mainly useful for PMPs.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
---
 drivers/ata/libata-eh.c |6 +-
 1 files changed, 5 insertions(+), 1 deletions(-)


What if the LLDD told us hotplug happened?

Even though sata_promise has SError, it should be noted that hotplug 
under sata_promise is not signalled through normal means, but by a 
special vendor-specific register



-
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: how to handle pata_via when controller not in fully-pci-native mode (two irqs?)

2007-07-03 Thread Jeff Garzik

Matt Sealey wrote:

Yes but the libata driver doesn't check the config register, it checks
the class code, no?


Talking about the end result...


-
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 3/4] Enable link power management for ata drivers

2007-07-05 Thread Jeff Garzik

Andrew Morton wrote:

On Thu, 5 Jul 2007 13:05:30 -0700
Kristen Carlson Accardi [EMAIL PROTECTED] wrote:


+   ATA_DFLAG_IPM   = (1  6), /* device supports interface PM */
ATA_DFLAG_CFG_MASK  = (1  8) - 1,


I had to bump this to (17), so we've run out.


You can shuffle the numbers a bit, as long as the masks (*_MASK) stay 
correct for their purpose


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: [patch 3/4] Enable link power management for ata drivers

2007-07-05 Thread Jeff Garzik

Andrew Morton wrote:

I guess we can bump ATA_DFLAG_CFG_MASK up to 12, like this?


Yep

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: + git-libata-all-fix.patch added to -mm tree

2007-07-05 Thread Jeff Garzik

[EMAIL PROTECTED] wrote:

The patch titled
 git-libata-all-fix
has been added to the -mm tree.  Its filename is
 git-libata-all-fix.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

--
Subject: git-libata-all-fix
From: Andrew Morton [EMAIL PROTECTED]

drivers/ata/libata-core.c:4253: error: redefinition of 'ata_fill_sg_dumb'
drivers/ata/libata-core.c:4191: error: previous definition of 
'ata_fill_sg_dumb' was here
drivers/ata/libata-core.c:4375: error: redefinition of 'ata_dumb_qc_prep'
drivers/ata/libata-core.c:4358: error: previous definition of 
'ata_dumb_qc_prep' was here

Cc: Jeff Garzik [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
---

 drivers/ata/libata-core.c |   79 
 1 file changed, 79 deletions(-)


I think Tejun did something similar.

Alas, I only had time to concentrate on 2.6.22-rc before I left for July 
4th.  That left libata-dev.git in a minorly broken state, for everything 
other than #master and #upstream-fixes.  I should have that cleaned up 
in the next day or so.  My apologies.


Whee, bleeding edge...

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: [PATCH 9/15] ide: add PIO masks

2007-07-05 Thread Jeff Garzik

Sergei Shtylyov wrote:

Hello.

Bartlomiej Zolnierkiewicz wrote:


* Add ATA_PIO[0-6] defines to linux/ata.h.



* Add -pio_mask field to ide_pci_device_t and ide_hwif_t.



* Add PIO masks to host drivers.


   Hm, the next logical step would be to use the mask constants in
linux/ata.h for the drivers' DMA caps too...


Certainly it is my hope to have share-able stuff in linux/ata.h that we 
all can use.  With ata_* (or ATA_*) prefix of course :)


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: Another Maxtor drive with broken NCQ

2007-07-07 Thread Jeff Garzik

Chuck Ebbert wrote:

On 07/06/2007 03:09 PM, Jeff Garzik wrote:

{Maxtor 6B200M0,  BANC1BM0, ATA_HORKAGE_NONCQ }

Or should *all* Maxtor 6B200M0 be blacklisted, since there's already
one of them in the list?

Wanna send that as a patch, with attribution and sign-offs?  :)



For all revisions, or just that one new one?


I don't think all 6B200M0 should be blacklisted, but BANC* is probably 
bad.  I don't think the code can do wildcard matching, so just the one 
revision is probably the best we can do at the moment.


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


ata and netdev (was Re: -mm merge plans for 2.6.23)

2007-07-10 Thread Jeff Garzik


(just to provide my indicator of status)

Andrew Morton wrote:

libata-config_pm=n-compile-fix.patch


that's for a branch that you don't get via libata-dev#ALL, #mv-ahci-pata.



pata_acpi-restore-driver.patch


see Alan's comments.  I've been ignoring pata_acpi for a while, because 
IMO it always needed work.




libata-core-convert-to-use-cancel_rearming_delayed_work.patch


will merge



libata-implement-ata_wait_after_reset.patch


I'm pretty much this is obsolete.  Tejun?



sata_promise-sata-hotplug-support.patch


will merge



libata-add-irq_flags-to-struct-pata_platform_info-fix.patch


are other pata_platform people happy with this?  I don't know embedded 
well enough to know if adding this struct member will break things.




ata-add-the-sw-ncq-support-to-sata_nv-for-mcp51-mcp55-mcp61.patch
sata_nv-allow-changing-queue-depth.patch


should be combined, really.  will merge eventually.  basic concept OK, 
but need to review in depth.



pata_hpt3x3-major-reworking-and-testing.patch
iomap-sort-out-the-broken-address-reporting-caused-by-the-iomap-layer.patch
ata-use-iomap_name.patch


generally OK



libata-check-for-an-support.patch
scsi-expose-an-to-user-space.patch
libata-expose-an-to-user-space.patch
scsi-save-disk-in-scsi_device.patch
libata-send-event-when-an-received.patch

 Am sitting on these due to confusion regarding the status of the ata-ahci
 patches.


I will apply what I can, but it seems there are lifetime problems



ata-ahci-alpm-store-interrupt-value.patch
ata-ahci-alpm-expose-power-management-policy-option-to-users.patch
ata-ahci-alpm-enable-link-power-management-for-ata-drivers.patch
ata-ahci-alpm-enable-aggressive-link-power-management-for-ahci-controllers.patch

 These appear to need some work.


seemed mostly OK to me.  what comments did I miss?



libata-add-human-readable-error-value-decoding.patch


still pondering; in my mbox queue


libata-fix-hopefully-all-the-remaining-problems-with.patch
testing-patch-for-ali-pata-fixes-hopefully-for-the-problems-with-atapi-dma.patch
pata_ali-more-work.patch


No idea.  I would poke Alan.  Probably drop.



8139too-force-media-setting-fix.patch
blackfin-on-chip-ethernet-mac-controller-driver.patch
atari_pamsnetc-old-declaration-ritchie-style-fix.patch
sundance-phy-address-form-0-only-for-device-id-0x0200.patch


Needs a bug fix, so that the newly modified loop doesn't scan the final 
phy id, then loop back around to scan the first again.




3x59x-fix-pci-resource-management.patch
update-smc91x-driver-with-arm-versatile-board-info.patch
drivers-net-ns83820c-add-paramter-to-disable-auto.patch

 netdev patches which are stuck in limbo land.


?  I don't think I've seen these.



bonding-bond_mainc-make-2-functions-static.patch


FWIW bonding stuff should go to me, since it lives mostly in drivers/net



x86-initial-fixmap-support.patch


Andi material?



mm-revert-kernel_ds-buffered-write-optimisation.patch
revert-81b0c8713385ce1b1b9058e916edcf9561ad76d6.patch
revert-6527c2bdf1f833cc18e8f42bd97973d583e4aa83.patch
mm-clean-up-buffered-write-code.patch
mm-debug-write-deadlocks.patch
mm-trim-more-holes.patch
mm-buffered-write-cleanup.patch
mm-write-iovec-cleanup.patch
mm-fix-pagecache-write-deadlocks.patch
mm-buffered-write-iterator.patch
fs-fix-data-loss-on-error.patch
mm-restore-kernel_ds-optimisations.patch
 pagefault-in-write deadlock fixes.  Will hold for 2.6.24.


Any of the above worth 2.6.23?  Just wondering if they were useful 
cleanups / minor fixes prior to new aops patches?




more-scheduled-oss-driver-removal.patch


ACK



oss-trident-massive-whitespace-removal.patch
oss-trident-fix-locking-around-write_voice_regs.patch
oss-trident-replace-deprecated-pci_find_device-with-pci_get_device.patch
remove-options-depending-on-oss_obsolete.patch

 Merge


what about just removing the OSS drivers in question?  :)



intel-iommu-dmar-detection-and-parsing-logic.patch
intel-iommu-pci-generic-helper-function.patch
intel-iommu-clflush_cache_range-now-takes-size-param.patch
intel-iommu-iova-allocation-and-management-routines.patch
intel-iommu-intel-iommu-driver.patch
intel-iommu-avoid-memory-allocation-failures-in-dma-map-api-calls.patch
intel-iommu-intel-iommu-cmdline-option-forcedac.patch
intel-iommu-dmar-fault-handling-support.patch
intel-iommu-iommu-gfx-workaround.patch
intel-iommu-iommu-floppy-workaround.patch

 Don't know.  I don't think there were any great objections, but I don't
 think much benefit has been demonstrated?


Just the general march of progress on new hardware :)

I would like to see this support merged in /some/ form.  We've been 
telling Intel for years they were sillyheads for not bothering with an 
IOMMU.  Now that they have, we should give them a cookie and support 
good technology.


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: [PATCH 2.6.22-rc7 1/3] libata: clean up horkage handling

2007-07-10 Thread Jeff Garzik

Tejun Heo wrote:

Horkage handling had the following problems.

* dev-horkage was positioned after ATA_DEVICE_CLEAR_OFFSET, so it was
  cleared before the device is configured.  This broke
  HORKAGE_DIAGNOSTIC.

* Some used dev-horkage while others called ata_device_blacklisted()
  directly.  This was at best confusing.

This patch moves dev-horkage right after dev-flags and set the field
according to the blacklist during device configuration.  All users
test against dev-horkage.  ata_device_blacklisted() now has only one
user, make it static.  While at it, rename it to ata_dev_blacklisted()
for consistency.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
---
 drivers/ata/libata-core.c |   13 -
 include/linux/libata.h|3 +--
 2 files changed, 9 insertions(+), 7 deletions(-)


applied


-
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 09/11] pata_hpt3x3: major reworking and testing

2007-07-10 Thread Jeff Garzik

[EMAIL PROTECTED] wrote:

From: Alan Cox [EMAIL PROTECTED]

The HPT343/345 (aka 363) is a bit of a warped device.  For many setups you
need to access the other registers via BAR4 offsets.  PIO is now rock
solid, DMA isn't.  Unfortunately the drivers/ide hpt34x driver is
completely broken so doesn't help further debug.

Signed-off-by: Alan Cox [EMAIL PROTECTED]
Cc: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
---

 drivers/ata/Kconfig   |   10 +++-
 drivers/ata/pata_hpt3x3.c |   90 ++--
 2 files changed, 85 insertions(+), 15 deletions(-)


applied, with fix posted to linux-ide


-
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 2.6.22-rc7] libata: quirk IOMEGA ZIP 250 ATAPI FLOPPY

2007-07-10 Thread Jeff Garzik

Tejun Heo wrote:

The Zip 250 which chokes on MWDMA SET_XFERMODE sometimes have Floppy
appeneded to its model number.  Quirk it too.

  http://bugzilla.kernel.org/show_bug.cgi?id=8563

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
Cc: Hans de Bruin [EMAIL PROTECTED]
---
It seems the Zip 250 mwdma failure on libata doesn't seem to be
libata's fault after all.  IDE also fails SET_XFERMODE on this drive
but IDE simply ignores the error and continues to operate in MWDMA
mode, so I guess we can remove the 'temporary fix' comment or add
another quirk type - ATA_HORKAGE_SETXFER_MAY_FAIL - and use it.

Anyways, for the time being, this should do.

 drivers/ata/libata-core.c |2 ++
 1 file changed, 2 insertions(+)


applied


-
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 01/16] libata-link: separate out ata_eh_handle_dev_fail()

2007-07-10 Thread Jeff Garzik

Tejun Heo wrote:

Separate out ata_eh_handle_dev_fail() from ata_eh_recover().  This is
in preparation of ata_link and PMP support.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
---
 drivers/ata/libata-eh.c |   96 +-
 1 files changed, 52 insertions(+), 44 deletions(-)


applied 1-2


-
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 10/16] libata-link: separate out link initialization functions

2007-07-10 Thread Jeff Garzik

Tejun Heo wrote:

Separate out link initialization into ata_link_init() and
ata_link_init_sata_spd_limit().

Signed-off-by: Tejun Heo [EMAIL PROTECTED]


Function name too long :)  Drop _limit perhaps.

Anyway, ACK 3-10


-
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 16/16] libata-link: update Power Management to handle PMP links

2007-07-10 Thread Jeff Garzik

Tejun Heo wrote:

Update Power Management to consider PMP links.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
---
 drivers/ata/libata-core.c |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)


ACK


-
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


[RFT][PATCH v6] sata_mv: convert to new EH

2007-07-11 Thread Jeff Garzik

This patch is diff'd against virgin 2.6.22 kernel, and does not require
any other patches (and indeed no other sata_mv patches should be applied
alongside this one).

Thanks to dean's feedback (and similar feedback from Dave), I think I
killed two key sata_mv bugs, either of which could cause the WARNING
spew being reported.  In sum, sata_mv was not doing a good job of
managing the software-managed request and response queue pointers.

Testing feedback with 2.6.22 + this patch would be appreciated.  It
works on my 6041 (Gen-II) and 5081 (Gen-I).  Haven't yet tried a Gen-IIE
chip (6042/7042-compatible).

 drivers/ata/sata_mv.c |  645 +-
 1 file changed, 428 insertions(+), 217 deletions(-)

diff -ur linux-2.6.22/drivers/ata/sata_mv.c 
linux-2.6.22-mv/drivers/ata/sata_mv.c
--- linux-2.6.22/drivers/ata/sata_mv.c  2007-07-08 19:32:17.0 -0400
+++ linux-2.6.22-mv/drivers/ata/sata_mv.c   2007-07-11 03:26:55.0 
-0400
@@ -79,7 +79,7 @@
 #include linux/libata.h
 
 #define DRV_NAME   sata_mv
-#define DRV_VERSION0.81
+#define DRV_VERSION0.81hack6
 
 enum {
/* BAR's are enumerated in terms of pci_resource_start() terms */
@@ -236,8 +236,10 @@
EDMA_ERR_DEV_DCON   = (1  3),
EDMA_ERR_DEV_CON= (1  4),
EDMA_ERR_SERR   = (1  5),
-   EDMA_ERR_SELF_DIS   = (1  7),
+   EDMA_ERR_SELF_DIS   = (1  7), /* Gen II/IIE self-disable */
+   EDMA_ERR_SELF_DIS_5 = (1  8), /* Gen I self-disable */
EDMA_ERR_BIST_ASYNC = (1  8),
+   EDMA_ERR_TRANS_IRQ_7= (1  8), /* Gen IIE transprt layer irq */
EDMA_ERR_CRBQ_PAR   = (1  9),
EDMA_ERR_CRPB_PAR   = (1  10),
EDMA_ERR_INTRL_PAR  = (1  11),
@@ -248,13 +250,33 @@
EDMA_ERR_LNK_CTRL_TX= (0x1f  21),
EDMA_ERR_LNK_DATA_TX= (0x1f  26),
EDMA_ERR_TRANS_PROTO= (1  31),
-   EDMA_ERR_FATAL  = (EDMA_ERR_D_PAR | EDMA_ERR_PRD_PAR |
-  EDMA_ERR_DEV_DCON | EDMA_ERR_CRBQ_PAR |
-  EDMA_ERR_CRPB_PAR | EDMA_ERR_INTRL_PAR |
-  EDMA_ERR_IORDY | EDMA_ERR_LNK_CTRL_RX_2 |
-  EDMA_ERR_LNK_DATA_RX |
-  EDMA_ERR_LNK_DATA_TX |
-  EDMA_ERR_TRANS_PROTO),
+   EDMA_ERR_OVERRUN_5  = (1  5),
+   EDMA_ERR_UNDERRUN_5 = (1  6),
+   EDMA_EH_FREEZE  = EDMA_ERR_D_PAR |
+ EDMA_ERR_PRD_PAR |
+ EDMA_ERR_DEV_DCON |
+ EDMA_ERR_DEV_CON |
+ EDMA_ERR_SERR |
+ EDMA_ERR_SELF_DIS |
+ EDMA_ERR_CRBQ_PAR |
+ EDMA_ERR_CRPB_PAR |
+ EDMA_ERR_INTRL_PAR |
+ EDMA_ERR_IORDY |
+ EDMA_ERR_LNK_CTRL_RX_2 |
+ EDMA_ERR_LNK_DATA_RX |
+ EDMA_ERR_LNK_DATA_TX |
+ EDMA_ERR_TRANS_PROTO,
+   EDMA_EH_FREEZE_5= EDMA_ERR_D_PAR |
+ EDMA_ERR_PRD_PAR |
+ EDMA_ERR_DEV_DCON |
+ EDMA_ERR_DEV_CON |
+ EDMA_ERR_OVERRUN_5 |
+ EDMA_ERR_UNDERRUN_5 |
+ EDMA_ERR_SELF_DIS_5 |
+ EDMA_ERR_CRBQ_PAR |
+ EDMA_ERR_CRPB_PAR |
+ EDMA_ERR_INTRL_PAR |
+ EDMA_ERR_IORDY,
 
EDMA_REQ_Q_BASE_HI_OFS  = 0x10,
EDMA_REQ_Q_IN_PTR_OFS   = 0x14, /* also contains BASE_LO */
@@ -288,6 +310,7 @@
/* Port private flags (pp_flags) */
MV_PP_FLAG_EDMA_EN  = (1  0),
MV_PP_FLAG_EDMA_DS_ACT  = (1  1),
+   MV_PP_FLAG_HAD_A_RESET  = (1  2),
 };
 
 #define IS_50XX(hpriv) ((hpriv)-hp_flags  MV_HP_50XX)
@@ -352,6 +375,10 @@
dma_addr_t  crpb_dma;
struct mv_sg*sg_tbl;
dma_addr_t  sg_tbl_dma;
+
+   unsigned intreq_idx;
+   unsigned intresp_idx;
+
u32 pp_flags;
 };
 
@@ -384,14 +411,14 @@
 static void mv_scr_write(struct ata_port *ap, unsigned int sc_reg_in, u32 val);
 static u32 mv5_scr_read(struct ata_port *ap, unsigned int sc_reg_in);
 static void mv5_scr_write(struct ata_port *ap, unsigned int sc_reg_in, u32 
val);
-static void mv_phy_reset(struct ata_port *ap);
-static void __mv_phy_reset(struct ata_port *ap, int can_sleep);
 static int mv_port_start(struct ata_port *ap);
 static void mv_port_stop(struct ata_port *ap);
 static void 

Re: [RFT][PATCH v7] sata_mv: convert to new EH

2007-07-12 Thread Jeff Garzik

dean gaudet wrote:

On Wed, 11 Jul 2007, Jeff Garzik wrote:


As before, this patch is against 2.6.22 with no other patches needed nor
applied.

In this revision, interrupt handling was improved quite a bit,
particularly for EDMA.  The WARNING in mv_get_crpb_status() goes away,
because that routine went away.  Its EDMA handling was potentially racy
as well.  It was replaced with a loop in mv_intr_edma() that guarantees
it always clears responses out of the queue, not a single response.

Here's hoping that the WARNING in mv_qc_issue() goes away as well, but I
am less than 50% confident that will happen.

The driver is making substantial progress with all these improvements,
though, in searching for the cause of this hardware behavior :)

Though if mv_qc_issue() still warns, I would be interested to know if
this driver works OK if the mv_qc_issue() warning is simply removed at
that point...


oh very nice... no warnings on boot, and no warnings while i dd 
if=/dev/sdX of=/dev/null and i'm seeing 74MB/s+ from each disk on this 
simple read test.


for lack of a better test i started an untar/diff stress test on the 
disks... we'll see how it goes.  (it's based on doug ledford's 
memtest.sh)


Thanks for the testing.  Looks like we might have hit on something good...

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


ipr using libata old-EH

2007-07-12 Thread Jeff Garzik
I just noticed that ipr is still using the old reset and error handling 
methods.  Once libata-dev.git (#mv-eh, #new-eh) work is merged, ipr is 
the last driver that uses old error handling methods.  Please look into 
upgrading the driver to -error_handler(), -freeze(), -thaw().


Thanks.

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: [PATCH] ata_piix: kill incorrect invalid map value warning

2007-07-12 Thread Jeff Garzik

Tejun Heo wrote:

The last two slots of MAP 00b of ich6m was incorrectly marked as
reserved.  This is left over from converting the entry to allow 00b.
This causes no real problem.  It only makes the driver print annoying
warning message.  Fix it.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
--
 drivers/ata/ata_piix.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 6a3bfef..21a7ca4 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -414,7 +414,7 @@ static const struct piix_map_db ich6m_map_db = {
 */
.map = {
/* PM   PS   SM   SS   MAP */
-   {  P0,  P2,  RV,  RV }, /* 00b */
+   {  P0,  P2,  NA,  NA }, /* 00b */
{ IDE, IDE,  P1,  P3 }, /* 01b */
{  P0,  P2, IDE, IDE }, /* 10b */
{  RV,  RV,  RV,  RV },


applied (with credit also to Pierre Tardy for spotting this as well)

-
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] libata: add another Maxtor drive with broken NCQ to the list

2007-07-12 Thread Jeff Garzik

Chuck Ebbert wrote:

Add another Maxtor 6B200M0 drive with broken NCQ to the list.

Signed-off-by: Chuck Ebbert [EMAIL PROTECTED]
---
 drivers/ata/libata-core.c |1 +
 1 file changed, 1 insertion(+)


applied


-
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 1/7] libata: remove irq_on from ata_bus_reset() and ata_std_postreset()

2007-07-12 Thread Jeff Garzik

Albert Lee wrote:

  It seems irq_on() in ata_bus_reset() and ata_std_postreset()
are leftover of the EDD reset. Remove them.

Signed-off-by: Albert Lee [EMAIL PROTECTED]


applied


-
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 04/15] libata-pmp: extend ACPI support to cover PMP

2007-07-12 Thread Jeff Garzik

Tejun Heo wrote:

Extend ata_acpi_associate_sata_port() such that it can handle PMP and
call it when PMP is attached and detached.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]


Though not your fault, I predict much puking of BIOS code, when PMP are 
attached and suspend/whatever ACPI-related.  I doubt ACPI writers take 
PMP into account.



-
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 06/15] sata_sil24: separate out sil24_exec_polled_cmd()

2007-07-12 Thread Jeff Garzik

Tejun Heo wrote:

Separate out sil24_exec_polled_cmd() from sil24_softreset().  This
will be used to implement sil24_pmp_read/write().


you should order patches like these near the top of the first patchset, 
since they are so easy and quick to review and merge.



-
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 07/15] sata_sil24: separate out sil24_do_softreset()

2007-07-12 Thread Jeff Garzik

Tejun Heo wrote:

Separate out sil24_do_softreset() which takes @pmp as its last
argument.  This will be used to implement sil24_pmp_softreset().

Signed-off-by: Tejun Heo [EMAIL PROTECTED]


ditto last comment


-
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 12/15] ahci: separate out ahci_kick_engine()

2007-07-12 Thread Jeff Garzik

Tejun Heo wrote:

Separate out stop_engine - CLO - start_engine sequence from
ahci_softreset() and ahci_clo() into ahci_reset_engine() and use it in
ahci_softreset() and ahci_post_internal_cmd().  The function will also
be used to prepare for and clean up after PMP register access
commands.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
---
 drivers/ata/ahci.c |   69 +++-
 1 files changed, 36 insertions(+), 33 deletions(-)


ditto


-
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 13/15] ahci: separate out ahci_exec_polled_cmd()

2007-07-12 Thread Jeff Garzik

Tejun Heo wrote:

Separate out ahci_exec_polled_cmd() from ahci_softreset().  This will
be used to implement ahci_pmp_read/write().  ahci_exec_polled_cmd()
performs reset_engine before returning if the command fails (times
out).  This is to improve robustness.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
---
 drivers/ata/ahci.c |   54 +++
 1 files changed, 33 insertions(+), 21 deletions(-)


ditto

might have to rediff to latest #upstream, versus my ahci.c changes


-
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 14/15] ahci: separate out ahci_do_softreset()

2007-07-12 Thread Jeff Garzik

Tejun Heo wrote:

Separate out ahci_do_softreset() which takes @pmp as its last
argument.  This will be used to implement ahci_pmp_softreset().

Signed-off-by: Tejun Heo [EMAIL PROTECTED]


ditto


-
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_mv: Test patch for Hightpoint RocketRaid 1740/1742

2007-07-12 Thread Jeff Garzik

Alan Cox wrote:

Underneath all the HPT packaging, PCI identifiers, binary driver modules
and stuff you find that ...

Signed-off-by: Alan Cox [EMAIL PROTECTED]

--- drivers/ata/sata_mv.c~  2007-07-09 13:19:57.003052904 +0100
+++ drivers/ata/sata_mv.c   2007-07-09 13:19:57.004052752 +0100
@@ -573,6 +573,9 @@
{ PCI_VDEVICE(MARVELL, 0x5041), chip_504x },
{ PCI_VDEVICE(MARVELL, 0x5080), chip_5080 },
{ PCI_VDEVICE(MARVELL, 0x5081), chip_508x },
+   /* RocketRAID 1740/174x have different identifiers */
+   { PCI_VDEVICE(TTI, 0x1740), chip_508x },
+   { PCI_VDEVICE(TTI, 0x1742), chip_508x },


If your testers could re-test on top of what I just submitted to Linus, 
that would be most helpful.  My non-RocketRAID 5081 works just fine, but 
sata_mv received some major changes and bug fixes, which could 
potentially change behavior here.


Since we're guessing (I assume?), I definitely want to make sure we have 
the correct MV variant for use with RocketRAID.


Any idea if RocketRAID is marketed as SATA-II or with NCQ support? 
(queueing in marketing lit doesn't help, alas).


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: 40-wire/80-wire detection

2007-07-12 Thread Jeff Garzik

Craig Block wrote:

Linux kernel: version 2.6.22.1
Chipset: VIA VT8363 + VT82C686A
Hard drives: Quantum Fireball LCT10 (UDMA66)

I'm having a problem with the 80-wire/40-wire cable detection in the
ata driver.  Even when I configure the kernel with IDEDMA_IVB set, I
still get the 40-wire speed downgrade on hda.

Why did you guys put that 80-wire/40-wire cable detection in the ata
driver anyway?  Since when is it your job to police me in making sure
I'm using the correct cable on my drives.  


If you signal a 40-wire cable too fast, you get trouble with a capital T.

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: Sata_Sil24: how to disable hotplug

2007-07-12 Thread Jeff Garzik

Fajun Chen wrote:

I wonder if there's an official way to disable hotplug for SATA Sil24?


Not really.  We do need to get our act together and figure out how to 
export knobs to blktool and similar programs, so that people can 
easily control this stuff without resorting to module options.


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


[PATCH 0/3] libata: add taskfile protocol -proto_mask info member

2007-07-14 Thread Jeff Garzik

These patches add proto_mask alongside pio_mask, mwdma_mask, and
udma_mask.  This is a more uniform way to export which features host
controllers support (DMA? NCQ? ATAPI? ATAPI DMA?), rather than creating
a new ATA_FLAG_xxx for each.

This also opens the door to useful things like combining if
protocol==foo || protocol==bar tests into a single mask, or masking
between host and device to determine common protocols.

Suggestions for improvement welcome, this is just the first cut.  Stored
on libata-dev.git#pmask for now.

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


[PATCH 1/3] libata: add -proto_mask

2007-07-14 Thread Jeff Garzik

commit c7baac44f3a02b895873cce48c6e426ddbea06b9
Author: Jeff Garzik [EMAIL PROTECTED]
Date:   Sat Jul 14 03:27:11 2007 -0400

[libata] Introduce per-port taskfile protocol masks

One ATA_PMASK_$name bitmapped value exists for each ATA_PROT_$name
value.

-proto_mask member added to ata_port and ata_port_info for holding
this data.

Signed-off-by: Jeff Garzik [EMAIL PROTECTED]

 drivers/ata/libata-core.c |3 +++
 drivers/ata/libata-scsi.c |1 +
 include/linux/ata.h   |   20 
 include/linux/libata.h|7 +++
 4 files changed, 31 insertions(+)

c7baac44f3a02b895873cce48c6e426ddbea06b9
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 88e2dd0..5cffca8 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -6007,6 +6007,7 @@ void ata_dev_init(struct ata_device *dev)
dev-pio_mask = UINT_MAX;
dev-mwdma_mask = UINT_MAX;
dev-udma_mask = UINT_MAX;
+   dev-proto_mask = UINT_MAX;
 }
 
 /**
@@ -6211,6 +6212,8 @@ struct ata_host *ata_host_alloc_pinfo(struct device *dev,
ap-pio_mask = pi-pio_mask;
ap-mwdma_mask = pi-mwdma_mask;
ap-udma_mask = pi-udma_mask;
+   ap-proto_mask = pi-proto_mask;
+
ap-flags |= pi-flags;
ap-ops = pi-port_ops;
 
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index cfde22d..f6da0cb 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -3234,6 +3234,7 @@ struct ata_port *ata_sas_port_alloc(struct ata_host *host,
ap-pio_mask = port_info-pio_mask;
ap-mwdma_mask = port_info-mwdma_mask;
ap-udma_mask = port_info-udma_mask;
+   ap-proto_mask = port_info-proto_mask;
ap-flags |= port_info-flags;
ap-ops = port_info-port_ops;
ap-cbl = ATA_CBL_SATA;
diff --git a/include/linux/ata.h b/include/linux/ata.h
index b5a2016..c5c4780 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -283,6 +283,26 @@ enum ata_tf_protocols {
ATA_PROT_ATAPI_DMA, /* packet command with special DMA sauce */
 };
 
+#define DEF(x) \
+   ATA_PMASK_##x = (1  ATA_PROT_##x)
+enum ata_tf_proto_masks {
+   DEF(NODATA),
+   DEF(PIO),
+   DEF(DMA),
+   DEF(NCQ),
+   DEF(ATAPI),
+   DEF(ATAPI_NODATA),
+   DEF(ATAPI_DMA),
+};
+#undef DEF
+
+enum ata_standard_proto_masks {
+   ATA_PMASK_SFF   = ATA_PMASK_NODATA | ATA_PMASK_PIO |
+ ATA_PMASK_ATAPI | ATA_PMASK_ATAPI_NODATA,
+   ATA_PMASK_SFF_DMA   = ATA_PMASK_SFF |
+ ATA_PMASK_DMA | ATA_PMASK_ATAPI_DMA,
+};
+
 enum ata_ioctls {
ATA_IOC_GET_IO32= 0x309,
ATA_IOC_SET_IO32= 0x324,
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 47cd2a1..2f9174c 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -457,6 +457,7 @@ struct ata_device {
unsigned intpio_mask;
unsigned intmwdma_mask;
unsigned intudma_mask;
+   unsigned intproto_mask;
 
/* for CHS addressing */
u16 cylinders;  /* Number of cylinders */
@@ -524,9 +525,12 @@ struct ata_port {
 
u8  ctl;/* cache of ATA control register */
u8  last_ctl;   /* Cache last written value */
+
unsigned intpio_mask;
unsigned intmwdma_mask;
unsigned intudma_mask;
+   unsigned intproto_mask;
+
unsigned intcbl;/* cable type; ATA_CBL_xxx */
unsigned inthw_sata_spd_limit;
unsigned intsata_spd_limit; /* SATA PHY speed limit */
@@ -638,9 +642,12 @@ struct ata_port_operations {
 struct ata_port_info {
struct scsi_host_template   *sht;
unsigned long   flags;
+
unsigned long   pio_mask;
unsigned long   mwdma_mask;
unsigned long   udma_mask;
+   unsigned long   proto_mask;
+
const struct ata_port_operations *port_ops;
irq_handler_t   irq_handler;
void*private_data;
-
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/3] libata: replace ATA_FLAG_{NCQ,NO_ATAPI} using -proto_mask

2007-07-14 Thread Jeff Garzik

commit a02791c8298bc0c2202a49c5e781ed2c68132dc8
Author: Jeff Garzik [EMAIL PROTECTED]
Date:   Sat Jul 14 04:10:11 2007 -0400

[libata] Use -proto_mask to replace NCQ and NO_ATAPI flags

Signed-off-by: Jeff Garzik [EMAIL PROTECTED]

 drivers/ata/ahci.c   |2 +-
 drivers/ata/libata-core.c|2 +-
 drivers/ata/libata-scsi.c|2 +-
 drivers/ata/pata_ixp4xx_cf.c |4 ++--
 drivers/ata/sata_mv.c|   19 ++-
 drivers/ata/sata_nv.c|4 ++--
 drivers/ata/sata_sil24.c |8 
 drivers/ata/sata_sx4.c   |5 +++--
 include/linux/ata.h  |2 ++
 include/linux/libata.h   |2 --
 10 files changed, 26 insertions(+), 24 deletions(-)

a02791c8298bc0c2202a49c5e781ed2c68132dc8
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 9043642..676aa6c 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1801,7 +1801,7 @@ static int ahci_init_one(struct pci_dev *pdev, const 
struct pci_device_id *ent)
 
/* prepare host */
if (!(pi.flags  AHCI_FLAG_NO_NCQ)  (hpriv-cap  HOST_CAP_NCQ))
-   pi.flags |= ATA_FLAG_NCQ;
+   pi.proto_mask |= ATA_PMASK_NCQ;
 
host = ata_host_alloc_pinfo(pdev-dev, ppi, fls(hpriv-port_map));
if (!host)
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 5cffca8..5036e83 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -1789,7 +1789,7 @@ static void ata_dev_config_ncq(struct ata_device *dev,
snprintf(desc, desc_sz, NCQ (not used));
return;
}
-   if (ap-flags  ATA_FLAG_NCQ) {
+   if (ap-proto_mask  ATA_PMASK_NCQ) {
hdepth = min(ap-scsi_host-can_queue, ATA_MAX_QUEUE - 1);
dev-flags |= ATA_DFLAG_NCQ;
}
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index f6da0cb..60ccf12 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -2458,7 +2458,7 @@ static int ata_scsi_dev_enabled(struct ata_device *dev)
if (unlikely(!ata_dev_enabled(dev)))
return 0;
 
-   if (!atapi_enabled || (dev-ap-flags  ATA_FLAG_NO_ATAPI)) {
+   if (!atapi_enabled || (!(dev-ap-proto_mask  ATA_PMASK_ALL_ATAPI))) {
if (unlikely(dev-class == ATA_DEV_ATAPI)) {
ata_dev_printk(dev, KERN_WARNING,
   WARNING: ATAPI is %s, device 
ignored.\n,
diff --git a/drivers/ata/pata_ixp4xx_cf.c b/drivers/ata/pata_ixp4xx_cf.c
index 121e7af..cb81a43 100644
--- a/drivers/ata/pata_ixp4xx_cf.c
+++ b/drivers/ata/pata_ixp4xx_cf.c
@@ -201,8 +201,8 @@ static __devinit int ixp4xx_pata_probe(struct 
platform_device *pdev)
 
ap-ops = ixp4xx_port_ops;
ap-pio_mask = 0x1f; /* PIO4 */
-   ap-proto_mask = ATA_PMASK_SFF;
-   ap-flags |= ATA_FLAG_MMIO | ATA_FLAG_NO_LEGACY | ATA_FLAG_NO_ATAPI;
+   ap-proto_mask = ATA_PMASK_NODATA | ATA_PMASK_PIO;
+   ap-flags |= ATA_FLAG_MMIO | ATA_FLAG_NO_LEGACY;
 
ixp4xx_setup_port(ap-ioaddr, data);
 
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index f45867e..8cd4384 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -127,9 +127,10 @@ enum {
MV_FLAG_DUAL_HC = (1  30),  /* two SATA Host Controllers */
MV_FLAG_IRQ_COALESCE= (1  29),  /* IRQ coalescing capability */
MV_COMMON_FLAGS = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
- ATA_FLAG_MMIO | ATA_FLAG_NO_ATAPI |
- ATA_FLAG_PIO_POLLING,
+ ATA_FLAG_MMIO | ATA_FLAG_PIO_POLLING,
MV_6XXX_FLAGS   = MV_FLAG_IRQ_COALESCE,
+   MV_PMASK= ATA_PMASK_NODATA | ATA_PMASK_PIO |
+ ATA_PMASK_DMA,
 
CRQB_FLAG_READ  = (1  0),
CRQB_TAG_SHIFT  = 1,
@@ -574,28 +575,28 @@ static const struct ata_port_info mv_port_info[] = {
.flags  = MV_COMMON_FLAGS,
.pio_mask   = 0x1f, /* pio0-4 */
.udma_mask  = ATA_UDMA6,
-   .proto_mask = ATA_PMASK_SFF_DMA,
+   .proto_mask = MV_PMASK,
.port_ops   = mv5_ops,
},
{  /* chip_508x */
.flags  = MV_COMMON_FLAGS | MV_FLAG_DUAL_HC,
.pio_mask   = 0x1f, /* pio0-4 */
.udma_mask  = ATA_UDMA6,
-   .proto_mask = ATA_PMASK_SFF_DMA,
+   .proto_mask = MV_PMASK,
.port_ops   = mv5_ops,
},
{  /* chip_5080 */
.flags  = MV_COMMON_FLAGS | MV_FLAG_DUAL_HC,
.pio_mask   = 0x1f, /* pio0-4 */
.udma_mask  = ATA_UDMA6,
-   .proto_mask = ATA_PMASK_SFF_DMA,
+   .proto_mask = MV_PMASK,
.port_ops   = mv5_ops

Re: sata_inic162x issue - PCMCIA card

2007-07-14 Thread Jeff Garzik

jm_928 wrote:

Hi,

I have an esata PCMCIA card based on the Initio 1620 chipset. When inserting
this into my Dell D600 laptop (running Ubuntu 7.04 with the 2.6.20-16
kernel) I get the following error messages:

[   27.66] sata_inic162x :03:00.0: version 0.1
[   27.66] PCI: Enabling device :03:00.0 ( - 0003)
[   27.66] ACPI: PCI Interrupt :03:00.0[A] - Link [LNKD] - GSI 11
(level, low) - IRQ 11
[   27.66] ACPI: PCI interrupt for device :03:00.0 disabled
[   27.66] sata_inic162x: probe of :03:00.0 failed with error -22

Does anyone have any hints on what this message (particularly error -22)
means?


-EINVAL

Maybe it's an interrupt problem, like the previous message indicates.

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: [PATCH] pata_platform: Fix NULL pointer dereference

2007-07-17 Thread Jeff Garzik

Paul Mundt wrote:

On Tue, Jul 17, 2007 at 05:33:00AM -0400, Jeff Garzik wrote:

Paul Mundt wrote:

It would be great if libata people could actually be bothered to CC
driver authors on driver changes so that way these things don't get
completely broken in mainline when simple testing on the platforms
that actually _rely_ on this driver would have shown that this was
broken.
The patch lived for weeks in -mm along with tons of other git trees 
Andrew pulls.  If you want a single point to watch for upcoming stuff, 
test the -mm trees.  It's a key part of the development process:  I 
merge a patch, -mm tree pulls my tree and others, people test and 
complain and give feedback, ...



A key part of the development process is making sure that driver authors
are aware of the changes being made to their drivers, so they're able to
ACK/NACK or at least point out something that's obviously wrong. I test
-mm when time permits, and this happened to slip through. If I had
actually been CC'ed on it, it would not have.

Your entire process is fundamentally flawed if you're merging the patch
first and expecting people to only find out if it's broken after the
fact. In the best case it leaves -mm broken for a single release, and in
the other case, it happens to make its way to mainline before anyone
notices.


It's just reality that there are never enough people to verify every 
patch before it goes in.  We just support way too much hardware for that 
to be remotely feasible.  Sure we -try- to keep the driver maintainer 
CC'd, but alas we are human.


Your thinking is flawed if you think I'm going to hold up every patch 
until it's verified on each of 63 ATA controller drivers, when I make a 
core change, for example.  Not scalable.  We scale in another way:


We have the biggest test lab in the world -- the Internet -- and a 
development process staged so that testing and development occur in 
parallel.  This here is actually an example of the process working: 
despite my forgetting to CC you, the problem was caught long before it 
made it into any release kernel.


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


[git patches 1/2] warnings: attack valid cases spotted by warnings

2007-07-17 Thread Jeff Garzik

Those may be used uninitialized warnings are annoying.  So annoying
that kernel developers tune them out, and that occasionally hides
real bugs, as my past patches (and those below) indicate.

I included the full-length changelog below the diffstat, because
that is where the best explanation for each change is found.  In most
cases that's where all the length is -- a paragraph or two describing
what is usually a one-line code change, usually an initialization or
simple cleanup.

This is the first of two git pull sets, the -parent-.  If you pull
'warnings' branch, you get what you see below and nothing else.
WYSIWYG.  You'll see in the second email why I distinguish the two.

Please pull from 'warnings' branch of
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6.git warnings

Jeff Garzik (11):
  kernel/auditfilter: kill bogus uninit'd-var compiler warning
  [netdrvr] natsemi: Fix device removal bug
  [netdrvr] eepro100, ne2k-pci: abort resume if pci_enable_device() fails
  drivers/usb/misc/auerswald: fix status check, remove redundant check
  drivers/net/wan/pc300_drv: fix bug caught by gcc warning
  drivers/telephony/ixj: cleanup and fix gcc warning
  drivers/mtd/ubi/eba: minor cleanup: tighten scope of a local var
  drivers/net/wan/sbni: kill uninit'd var warning
  drivers/infiniband/hw/mthca/mthca_qp: kill uninit'd var warning
  [libata] sata_mv: use pci_try_set_mwi()
  drivers/atm/ambassador: kill uninit'd var warning, and fix bug

 drivers/ata/sata_mv.c  |2 +-
 drivers/atm/ambassador.c   |4 +++-
 drivers/infiniband/hw/mthca/mthca_qp.c |4 ++--
 drivers/mtd/ubi/eba.c  |4 ++--
 drivers/net/eepro100.c |7 ++-
 drivers/net/natsemi.c  |2 +-
 drivers/net/ne2k-pci.c |7 ++-
 drivers/net/wan/pc300_drv.c|2 ++
 drivers/net/wan/sbni.c |7 +++
 drivers/telephony/ixj.c|7 ++-
 drivers/usb/misc/auerswald.c   |2 +-
 kernel/auditfilter.c   |   12 
 12 files changed, 37 insertions(+), 23 deletions(-)

commit b1734d2388cc45ecdec58615e35955d0d402f938
Author: Jeff Garzik [EMAIL PROTECTED]
Date:   Tue Jul 17 02:32:21 2007 -0400

drivers/atm/ambassador: kill uninit'd var warning, and fix bug

An uninitialized variable warning illuminated an area where indeed the
variable was being used without initialization.  Unfortunately, after
verifying all such paths were fixed, the warning still appears.  So we
follow the initialization practice of other variables in this function.

Signed-off-by: Jeff Garzik [EMAIL PROTECTED]

commit ea8b4db97aa41a66c05daa4055a1974692ccd52d
Author: Jeff Garzik [EMAIL PROTECTED]
Date:   Tue Jul 17 02:21:50 2007 -0400

[libata] sata_mv: use pci_try_set_mwi()

Because sometimes in life, it's ok to fail.

Signed-off-by: Jeff Garzik [EMAIL PROTECTED]

commit 9db48926208562df3c778682e064990170ab8971
Author: Jeff Garzik [EMAIL PROTECTED]
Date:   Tue Jul 17 02:03:49 2007 -0400

drivers/infiniband/hw/mthca/mthca_qp: kill uninit'd var warning

drivers/infiniband/hw/mthca/mthca_qp.c: In function
  ‘mthca_tavor_post_send’:
drivers/infiniband/hw/mthca/mthca_qp.c:1594: warning: ‘f0’ may be used
  uninitialized in this function
drivers/infiniband/hw/mthca/mthca_qp.c: In function
  ‘mthca_arbel_post_send’:
drivers/infiniband/hw/mthca/mthca_qp.c:1949: warning: ‘f0’ may be used
  uninitialized in this function

Initializing 'f0' is not strictly necessary in either case, AFAICS.

I was considering use of uninitialized_var(), but looking at the
complex flow of control in each function, I feel it is wiser and
safer to simply zero the var and be certain of ourselves.

Signed-off-by: Jeff Garzik [EMAIL PROTECTED]

commit e5fb4f42268654ca41ab50b1406fb7da97559db5
Author: Jeff Garzik [EMAIL PROTECTED]
Date:   Tue Jul 17 01:56:32 2007 -0400

drivers/net/wan/sbni: kill uninit'd var warning

It's actually convenient in the code to initialize this and a sister
variable to zero.

Signed-off-by: Jeff Garzik [EMAIL PROTECTED]

commit 2ab934b8afa89b9b3e71b7fb66470a19772f5012
Author: Jeff Garzik [EMAIL PROTECTED]
Date:   Tue Jul 17 01:49:56 2007 -0400

drivers/mtd/ubi/eba: minor cleanup: tighten scope of a local var

Signed-off-by: Jeff Garzik [EMAIL PROTECTED]

commit 0d480db85dea59e1393c3968fbdac0117431e797
Author: Jeff Garzik [EMAIL PROTECTED]
Date:   Tue Jul 17 01:35:08 2007 -0400

drivers/telephony/ixj: cleanup and fix gcc warning

1) Fix gcc uninit'd var warnings by adding 'default' switch stmt labels
in two cases.  It was lightning-strikes unlikely that a problem would
ever arise, but not impossible.

2) Tighten the scope of 'blankword' in two cases

[git patches 2/2] warnings: use uninitialized_var()

2007-07-17 Thread Jeff Garzik

For many months, I have maintained a hand-verified list of bogus may be
used uninitialized warning fixes, in misc-2.6.git#gccbug.  Andrew urged
me to head these upstream.

I have gone through and re-analyzed each warning, and verified that
these variables are indeed initialized properly, and gcc is making
needless noise.

These uninitialized_var() markers are in a separate branch from the
other warning fixes/silences to enable people to object to this
separately.

Potential upsides of pulling 'uninit-var':

* reduces noise proven to hide bugs
* pushes upstream the work I have done, hand-verifying that each
  warning so marked is indeed bogus.
* uninitialized_var a grep-friendly symbol
* uninitialized_var could be disabled via Kconfig, if someone
  really wanted to see the warnings again

Potential downsides to uninitialized_var():

* Future code changes related to a marked variable could potentially
  result in hiding a valid uninit'd-var warning (i.e. hiding a bug).
* uninitialized_var stands out in the code.  Ugly?  Or a good thing?

This is the second of two git pulls, the -child-.  If you pull branch
'uninit-var', you will receive BOTH 'uninit-var' and 'warnings'
branches.

Please pull from 'uninit-var' branch of
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6.git uninit-var

commit 8e1c091cccd551557d24ce845715e8ceb6c49d36
Author: Jeff Garzik [EMAIL PROTECTED]
Date:   Tue Jul 17 05:40:59 2007 -0400

arch/i386/* fs/* ipc/*: mark variables with uninitialized_var()

Mark variables with uninitialized_var() if such a warning appears,
and analysis proves that the var is initialized properly on all paths
it is used.

Signed-off-by: Jeff Garzik [EMAIL PROTECTED]

commit a6343afb6e16b65b9f0b264f94f8207212e7e3ae
Author: Jeff Garzik [EMAIL PROTECTED]
Date:   Tue Jul 17 05:39:58 2007 -0400

drivers/*: mark variables with uninitialized_var()

Mark variables in drivers/* with uninitialized_var() if such a warning
appears, and analysis proves that the var is initialized properly on all
paths it is used.

Signed-off-by: Jeff Garzik [EMAIL PROTECTED]

 arch/i386/kernel/efi.c|2 +-
 drivers/atm/zatm.c|4 +++-
 drivers/char/cyclades.c   |4 ++--
 drivers/mtd/ubi/eba.c |2 +-
 drivers/net/r8169.c   |2 +-
 drivers/net/tokenring/smctr.c |6 --
 drivers/usb/misc/auerswald.c  |2 +-
 drivers/video/matrox/matroxfb_maven.c |9 +++--
 drivers/video/riva/riva_hw.c  |7 ++-
 fs/ocfs2/file.c   |3 ++-
 fs/udf/super.c|2 +-
 ipc/msg.c |4 ++--
 ipc/sem.c |2 +-
 13 files changed, 32 insertions(+), 17 deletions(-)

diff --git a/arch/i386/kernel/efi.c b/arch/i386/kernel/efi.c
index a180802..2452c6f 100644
--- a/arch/i386/kernel/efi.c
+++ b/arch/i386/kernel/efi.c
@@ -278,7 +278,7 @@ void efi_memmap_walk(efi_freemem_callback_t callback, void 
*arg)
struct range {
unsigned long start;
unsigned long end;
-   } prev, curr;
+   } uninitialized_var(prev), curr;
efi_memory_desc_t *md;
unsigned long start, end;
void *p;
diff --git a/drivers/atm/zatm.c b/drivers/atm/zatm.c
index 020a87a..58583c6 100644
--- a/drivers/atm/zatm.c
+++ b/drivers/atm/zatm.c
@@ -915,7 +915,7 @@ static int open_tx_first(struct atm_vcc *vcc)
unsigned long flags;
u32 *loop;
unsigned short chan;
-   int pcr,unlimited;
+   int unlimited;
 
DPRINTK(open_tx_first\n);
zatm_dev = ZATM_DEV(vcc-dev);
@@ -936,6 +936,8 @@ static int open_tx_first(struct atm_vcc *vcc)
vcc-qos.txtp.max_pcr = ATM_OC3_PCR);
if (unlimited  zatm_dev-ubr != -1) zatm_vcc-shaper = zatm_dev-ubr;
else {
+   int uninitialized_var(pcr);
+
if (unlimited) vcc-qos.txtp.max_sdu = ATM_MAX_AAL5_PDU;
if ((zatm_vcc-shaper = alloc_shaper(vcc-dev,pcr,
vcc-qos.txtp.min_pcr,vcc-qos.txtp.max_pcr,unlimited))
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index 7b08394..9e0adfe 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -4466,10 +4466,10 @@ static void cy_hangup(struct tty_struct *tty)
 static int __devinit cy_init_card(struct cyclades_card *cinfo)
 {
struct cyclades_port *info;
-   u32 mailbox;
+   u32 uninitialized_var(mailbox);
unsigned int nports;
unsigned short chip_number;
-   int index, port;
+   int uninitialized_var(index), port;
 
spin_lock_init(cinfo-card_lock);
 
diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c
index 4dc10c8..7c6b223 100644
--- a/drivers/mtd/ubi/eba.c
+++ b/drivers/mtd/ubi/eba.c
@@ -368,7 +368,7 @@ int ubi_eba_read_leb(struct ubi_device *ubi, int vol_id, 
int lnum

Re: [git patches 1/2] warnings: attack valid cases spotted by warnings

2007-07-17 Thread Jeff Garzik

Roland Dreier wrote:

  drivers/infiniband/hw/mthca/mthca_qp: kill uninit'd var warning
  
  drivers/infiniband/hw/mthca/mthca_qp.c: In function

‘mthca_tavor_post_send’:
  drivers/infiniband/hw/mthca/mthca_qp.c:1594: warning: ‘f0’ may be 
used
uninitialized in this function
  drivers/infiniband/hw/mthca/mthca_qp.c: In function
‘mthca_arbel_post_send’:
  drivers/infiniband/hw/mthca/mthca_qp.c:1949: warning: ‘f0’ may be 
used
uninitialized in this function
  
  Initializing 'f0' is not strictly necessary in either case, AFAICS.
  
  I was considering use of uninitialized_var(), but looking at the

  complex flow of control in each function, I feel it is wiser and
  safer to simply zero the var and be certain of ourselves.
  
  Signed-off-by: Jeff Garzik [EMAIL PROTECTED]


I don't really like this.  These functions are in the hottest, most
latency-sensitive code path of this driver, which is used by people
who care about nanoseconds.  I'm quite confident that the code is
correct as written, and it really feels wrong to me to add bloat to
the fastpath just to cover up a shortcoming of gcc.


I don't buy that performance argument, in this case.  You are already 
dirtying the same cacheline with other variable initializations.


Like I noted in the changeset description (hey, this is precisely why I 
included it, so that we could have this discussion), IMO the flow of 
control makes it not only impossible for the compiler to understand the 
full value range of 'f0', but also difficult for humans as well.


I could perhaps understand initializing the variable to some poison 
value rather than zero, but IMO the code is stronger with f0 set to a 
sane value.


It's poorly readable, poorly commented code as-is.

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: [git patches 1/2] warnings: attack valid cases spotted by warnings

2007-07-17 Thread Jeff Garzik

Jeff Garzik wrote:
I don't buy that performance argument, in this case.  You are already 
dirtying the same cacheline with other variable initializations.


Or simply sitting in a CPU register for large stretches of function 
runtime...


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: [git patches 1/2] warnings: attack valid cases spotted by warnings

2007-07-17 Thread Jeff Garzik

Roland Dreier wrote:

In this case the code is basically

u32 x;

for (n = 0; cond; ++n) {
...
if (!n)
x = something;
...
}

if (n) {
...
use(x);
...
}

and gcc still warns...



Interestingly, the above accurately describes a common code pattern 
matching code which caused gcc to emit the uninit'd-var warnings.


For the record I think initializating 'f0' to zero is safer for the 
reasons Linus gave, and in addition, f0 is or'd with a value written to 
a hardware register, which means things should go awry (if they go) in a 
semi-predictable manner.


According to the assembly language produced, sure it is larger -- by one 
(per function) MOV that is adjacent to other initializations, making it 
highly likely the initializations are all streamed together.  I doubt 
one MOV per function will make a huge difference, considering the peace 
of mind it buys.


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: [git patches 1/2] warnings: attack valid cases spotted by warnings

2007-07-18 Thread Jeff Garzik

Greg KH wrote:

On Tue, Jul 17, 2007 at 05:42:39PM -0400, Jeff Garzik wrote:

commit ae97fec3701a559929c3529e35417fab133a4d39
Author: Jeff Garzik [EMAIL PROTECTED]
Date:   Tue Jul 17 01:08:29 2007 -0400

drivers/usb/misc/auerswald: fix status check, remove redundant check

1) We should only set 'actual_length' output variable if usb length is

known to be good.

2) No need to check actual_length for NULL.  The only caller always

passes non-NULL value.

Signed-off-by: Jeff Garzik [EMAIL PROTECTED]


I have no objection to this patch at all, however it does not remove the
compiler warning :(


The description doesn't say it removes a warning, so it doesn't :)

You want to look at

drivers/*: mark variables with uninitialized_var()

which was in posting [git patches 2/2] warnings: use 
uninitialized_var() and is now upstream commit 
a6343afb6e16b65b9f0b264f94f8207212e7e3ae


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: [PATCH] Fix SMART reporting on 2.6.22

2007-07-20 Thread Jeff Garzik

Petr Vandrovec wrote:

On Mon, Jul 16, 2007 at 07:32:57PM +0900, Tejun Heo wrote:

[cc'ing Jeff and Albert]

Petr Vandrovec wrote:

Fix reported task file values in sense data

ata_tf_read was setting HOB bit when lba48 command was submitted, but
was not clearing it before reading normal data.  Maybe it would be
better to just clear HOB bit immediately after reading upper halves
for lba48 command, but I just decided to clear HOB bit in each
ata_tf_read...

Signed-off-by: Petr Vandrovec [EMAIL PROTECTED]

Acked-by: Tejun Heo [EMAIL PROTECTED]

Gee, thanks a lot for spotting this.  This is definitely for -stable.
Hmm... it's a separate issue and not your fault but ap-last_ctl caching
is broken in the function.  Albert is about to remove ap-last_ctl
caching but we still need to fix it for -stable.  Petr, are you
interested in submitting a separate patch for fixing ap-last_ctl
handling in the function?


OK, that pushed me over edge so this replaces my previous patch.  Now
there is no ctl access when 24bit commands are issued back to back, and
ctl is touched (twice...) only for 48bit commands.  smartctl still works...
Any other email address I should CC?
Thanks,
Petr Vandrovec


Fix reported task file values in sense data

ata_tf_read was setting HOB bit when lba48 command was submitted, but
was not clearing it before reading normal data.  As it is only place
which sets HOB bit in control register, and register reads should not
be affected by other bits, let's just clear it when we are done with
reading upper bytes so non-48bit commands do not have to touch ctl
at all.

pata_scc suffered from same problem...

Signed-off-by: Petr Vandrovec [EMAIL PROTECTED]

---
commit d09591edad8e75c9bc850d47b68a9a6f6f107998
tree 1bd5a79c9cade9b7ebf68b13bf24a879b969e4c8
parent a5fcaa210626a79465321e344c91a6a7dc3881fa
author Petr Vandrovec [EMAIL PROTECTED] Tue, 17 Jul 2007 03:45:43 -0700
committer Petr Vandrovec [EMAIL PROTECTED] Tue, 17 Jul 2007 03:45:43 -0700

 drivers/ata/libata-sff.c |2 ++
 drivers/ata/pata_scc.c   |2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index ca7d224..6a579a9 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -211,6 +211,8 @@ void ata_tf_read(struct ata_port *ap, struct ata_taskfile 
*tf)
tf-hob_lbal = ioread8(ioaddr-lbal_addr);
tf-hob_lbam = ioread8(ioaddr-lbam_addr);
tf-hob_lbah = ioread8(ioaddr-lbah_addr);
+   iowrite8(tf-ctl, ioaddr-ctl_addr);
+   ap-last_ctl = tf-ctl;
}
 }
 
diff --git a/drivers/ata/pata_scc.c b/drivers/ata/pata_scc.c

index c55667e..60cce07 100644
--- a/drivers/ata/pata_scc.c
+++ b/drivers/ata/pata_scc.c
@@ -358,6 +358,8 @@ static void scc_tf_read (struct ata_port *ap, struct 
ata_taskfile *tf)
tf-hob_lbal = in_be32(ioaddr-lbal_addr);
tf-hob_lbam = in_be32(ioaddr-lbam_addr);
tf-hob_lbah = in_be32(ioaddr-lbah_addr);
+   out_be32(ioaddr-ctl_addr, tf-ctl);
+   ap-last_ctl = tf-ctl;
}
 }
 





Fix reported task file values in sense data

ata_tf_read was setting HOB bit when lba48 command was submitted, but
was not clearing it before reading normal data.  As it is only place
which sets HOB bit in control register, and register reads should not
be affected by other bits, let's just clear it when we are done with
reading upper bytes so non-48bit commands do not have to touch ctl
at all.

pata_scc suffered from same problem...

Signed-off-by: Petr Vandrovec [EMAIL PROTECTED]

---
commit d09591edad8e75c9bc850d47b68a9a6f6f107998
tree 1bd5a79c9cade9b7ebf68b13bf24a879b969e4c8
parent a5fcaa210626a79465321e344c91a6a7dc3881fa
author Petr Vandrovec [EMAIL PROTECTED] Tue, 17 Jul 2007 03:45:43 -0700
committer Petr Vandrovec [EMAIL PROTECTED] Tue, 17 Jul 2007 03:45:43 -0700

 drivers/ata/libata-sff.c |2 ++
 drivers/ata/pata_scc.c   |2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index ca7d224..6a579a9 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -211,6 +211,8 @@ void ata_tf_read(struct ata_port *ap, struct ata_taskfile 
*tf)
tf-hob_lbal = ioread8(ioaddr-lbal_addr);
tf-hob_lbam = ioread8(ioaddr-lbam_addr);
tf-hob_lbah = ioread8(ioaddr-lbah_addr);
+   iowrite8(tf-ctl, ioaddr-ctl_addr);
+   ap-last_ctl = tf-ctl;
}
 }
 
diff --git a/drivers/ata/pata_scc.c b/drivers/ata/pata_scc.c

index c55667e..60cce07 100644
--- a/drivers/ata/pata_scc.c
+++ b/drivers/ata/pata_scc.c
@@ -358,6 +358,8 @@ static void scc_tf_read (struct ata_port *ap, struct 
ata_taskfile *tf)
tf-hob_lbal = 

Re: [patch] libata: fix last_ctl caching in ata_tf_read()

2007-07-20 Thread Jeff Garzik

Chuck Ebbert wrote:

libata: fix last_ctl caching in ata_tf_read()

last_ctl was not cached properly. (Pointed out
by Tejun Heo.)

Signed-off-by: Chuck Ebbert [EMAIL PROTECTED]

---
(Apply after Petr's patch to fix SMART bugs.)

 drivers/ata/libata-sff.c |4 
 1 file changed, 4 insertions(+)


Petr's new patch eliminates the need for this...


-
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 2.6.22-git13] libata: add ST9160821AS 3.CLF to NONCQ blacklist

2007-07-20 Thread Jeff Garzik

Tejun Heo wrote:

Yay, the first one from Seagate.  3.ALC firmware is okay.  This was
reported by Sam Freed on bugzilla bug 8759.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
Signed-off-by: Sam Freed [EMAIL PROTECTED]
---
 drivers/ata/libata-core.c |1 +
 1 file changed, 1 insertion(+)


applied


-
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] ahci.c: fix CONFIG_PM=n compilation

2007-07-20 Thread Jeff Garzik

Alexey Dobriyan wrote:

Commit df69c9c5438b4e396a64d42608b2a6c48a3e7475 moved only prototype of
out of CONFIG_PM. Move function out as well. Box seems to boot fine.

Signed-off-by: Alexey Dobriyan [EMAIL PROTECTED]
---

 drivers/ata/ahci.c |   16 
 1 file changed, 8 insertions(+), 8 deletions(-)


applied


-
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] pata_scc.c: small fixes (Workaround for errata A308)

2007-07-20 Thread Jeff Garzik

Akira Iguchi wrote:

This patch fixes some issues of the previous patch:
- Use mode_filter() hook to limit ATAPI UDMA mode
- data loss warning message
- handling of udma_mask

Signed-off-by: Kou Ishizaki [EMAIL PROTECTED]
Signed-off-by: Akira Iguchi [EMAIL PROTECTED]


applied


-
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] add more device IDs for supporting SB700 (resend)

2007-07-20 Thread Jeff Garzik

su henry wrote:

From: [EMAIL PROTECTED]
The SATA controller device ID is different according to
the onchip SATA type set in the system BIOS:
Device  Device ID
SATA in IDE mode 0x4390
SATA in AHCI mode   0x4391
SATA in non-raid5 driver 0x4392
SATA in raid5 driver   0x4393

Although the device ID is different, they use the same AHCI driver
.The attached file is the patch for adding these device
IDs for ATI SB700.

Signed-off-by: [EMAIL PROTECTED]


applied


-
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] ahci: reimplement port_map handling

2007-07-20 Thread Jeff Garzik

Where does this stand, now that I dove into PMP patchset 1 of 4?

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: [patch 10/11] iomap: sort out the broken address reporting caused by the iomap layer

2007-07-20 Thread Jeff Garzik

[EMAIL PROTECTED] wrote:

From: Alan Cox [EMAIL PROTECTED]

Add an iomap_name() function which translates an I/O map into a string to
print.

Use it for the Libata layer

For now we use 0x for I/O and 0x for MMIO.  I'm assuming that
eventually some other platforms will want to use their own iomap_name() and
we can add ARCH_HAVE_IOMAP_NAME later as such a platform needs it.

Signed-off-by: Alan Cox [EMAIL PROTECTED]
Cc: Jeff Garzik [EMAIL PROTECTED]
Cc: Tejun Heo [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
---

 include/asm-generic/iomap.h |5 +
 lib/iomap.c |   12 
 2 files changed, 17 insertions(+)

diff -puN 
include/asm-generic/iomap.h~iomap-sort-out-the-broken-address-reporting-caused-by-the-iomap-layer
 include/asm-generic/iomap.h
--- 
a/include/asm-generic/iomap.h~iomap-sort-out-the-broken-address-reporting-caused-by-the-iomap-layer
+++ a/include/asm-generic/iomap.h
@@ -65,4 +65,9 @@ struct pci_dev;
 extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long 
max);
 extern void pci_iounmap(struct pci_dev *dev, void __iomem *);
 
+/* Convert an iomap to text for this platform */

+extern char *iomap_name(void __iomem *addr, char *buf, size_t len);
+#define IOMAP_NAMELEN  12


this will truncate on 64-bit addresses

otherwise OK


-
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 11/11] ata: use iomap_name()

2007-07-20 Thread Jeff Garzik

[EMAIL PROTECTED] wrote:

From: Alan Cox [EMAIL PROTECTED]

Use iomap_name() in the libata layer

Signed-off-by: Alan Cox [EMAIL PROTECTED]
Cc: Jeff Garzik [EMAIL PROTECTED]
Cc: Tejun Heo [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]


ACK

will await resend when previous patch is updated


-
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 17/21] libata: improve SCSI scan failure handling

2007-07-20 Thread Jeff Garzik

Tejun Heo wrote:

SCSI scan may fail due to memory allocation failure even if EH is not
in progress.  Due to use of GFP_ATOMIC in SCSI scan path, allocation
failure isn't too rare especially while probing multiple devices at
once which is the case when a bunch of devices are connected to PMP.

This patch moves SCSI scan failure detetion logic from
ata_scsi_hotplug() to ata_scsi_scan_host() and implement synchronous
scan behavior.  The synchronous path sleeps briefly and repeats SCSI
scan if some devices aren't attached properly.  It contains robust
retry loop to minimize the chance of device misdetection during boot
and falls back to async retry if everything fails.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
---
 drivers/ata/libata-core.c |2 +-
 drivers/ata/libata-scsi.c |   63 +---
 drivers/ata/libata.h  |2 +-
 3 files changed, 49 insertions(+), 18 deletions(-)


applied 17-21, though this one makes me nervous.  off to test upstream + 
patchset #1...  :)



-
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 02/21] libata: add @is_cmd to ata_tf_to_fis()

2007-07-20 Thread Jeff Garzik

Tejun Heo wrote:

Jeff Garzik wrote:

Tejun Heo wrote:

Add @is_cmd to ata_tf_to_fis().  This controls bit 7 of the second
byte which tells the device whether this H2D FIS is for a command or
not.  This cleans up ahci a bit and will be used by PMP.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
---
 drivers/ata/ahci.c|   10 --
 drivers/ata/libata-core.c |   14 --
 drivers/ata/sata_qstor.c  |2 +-
 drivers/ata/sata_sil24.c  |2 +-
 include/linux/libata.h|3 ++-
 5 files changed, 16 insertions(+), 15 deletions(-)

applied 2-14


Hmmm... Where did patch 1 go?  Did you receive it?


It was one of several copies I received :)


-
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 02/21] libata: add @is_cmd to ata_tf_to_fis()

2007-07-20 Thread Jeff Garzik

Tejun Heo wrote:

+extern void ata_tf_to_fis(const struct ata_taskfile *tf,
+ u8 pmp, int is_cmd, u8 *fis);



I'm applying these... but I would like to start seeing 'bool' type used 
for arguments like is_cmd, for situations where the only values we 
-ever- care about are true or false.


I really feel the bool type makes function prototypes more readable, 
in particular.


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: [PATCH 02/21] libata: add @is_cmd to ata_tf_to_fis()

2007-07-20 Thread Jeff Garzik

Tejun Heo wrote:

Add @is_cmd to ata_tf_to_fis().  This controls bit 7 of the second
byte which tells the device whether this H2D FIS is for a command or
not.  This cleans up ahci a bit and will be used by PMP.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
---
 drivers/ata/ahci.c|   10 --
 drivers/ata/libata-core.c |   14 --
 drivers/ata/sata_qstor.c  |2 +-
 drivers/ata/sata_sil24.c  |2 +-
 include/linux/libata.h|3 ++-
 5 files changed, 16 insertions(+), 15 deletions(-)


applied 2-14


-
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 12/21] libata: make -scr_read/write callbacks return error code

2007-07-20 Thread Jeff Garzik

Tejun Heo wrote:

Convert -scr_read/write callbacks to return error code to better
indicate failure.  This will help handling of SCR_NOTIFICATION.


This is a welcome improvement, for reasons beyond PMP.

Thanks,

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


[PATCH] sata_mv: non-working NCQ support

2007-07-23 Thread Jeff Garzik

This patch adds NCQ support to the sata_mv driver.  Currently it does
not work:  FPDMA commands time out, and eventually EH falls back to
non-NCQ, which works.

My attention has turned to other things for moment.  Anybody interested
in sata_mv NCQ is encouraged to pick up where this left off, as this
patch, buggy or not, includes the changes that will be required to
enable command queueing in sata_mv.


commit 6bef64243c68bf637b5594a0a363d8105efedfa6
Author: Jeff Garzik [EMAIL PROTECTED]
Date:   Wed Jul 11 18:56:46 2007 -0400

[libata mv-ncq] sata_mv: Add NCQ support

Currently not working.

Signed-off-by: Jeff Garzik [EMAIL PROTECTED]

 drivers/ata/sata_mv.c |   70 +++---
 1 file changed, 49 insertions(+), 21 deletions(-)

diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 8ec5208..228f71a 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -29,8 +29,6 @@
   I distinctly remember a couple workarounds (one related to PCI-X)
   are still needed.
 
-  4) Add NCQ support (easy to intermediate, once new-EH support appears)
-
   5) Investigate problems with PCI Message Signalled Interrupts (MSI).
 
   6) Add port multiplier support (intermediate)
@@ -417,6 +415,7 @@ static void mv_error_handler(struct ata_port *ap);
 static void mv_post_int_cmd(struct ata_queued_cmd *qc);
 static void mv_eh_freeze(struct ata_port *ap);
 static void mv_eh_thaw(struct ata_port *ap);
+static void mv6_dev_config(struct ata_device *dev);
 static int mv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
 
 static void mv5_phy_errata(struct mv_host_priv *hpriv, void __iomem *mmio,
@@ -440,6 +439,8 @@ static void mv6_reset_flash(struct mv_host_priv *hpriv, 
void __iomem *mmio);
 static void mv_reset_pci_bus(struct pci_dev *pdev, void __iomem *mmio);
 static void mv_channel_reset(struct mv_host_priv *hpriv, void __iomem *mmio,
 unsigned int port_no);
+static void mv_edma_cfg(struct ata_port *ap, struct mv_host_priv *hpriv,
+   void __iomem *port_mmio);
 
 static struct scsi_host_template mv5_sht = {
.module = THIS_MODULE,
@@ -464,7 +465,8 @@ static struct scsi_host_template mv6_sht = {
.name   = DRV_NAME,
.ioctl  = ata_scsi_ioctl,
.queuecommand   = ata_scsi_queuecmd,
-   .can_queue  = ATA_DEF_QUEUE,
+   .change_queue_depth = ata_scsi_change_queue_depth,
+   .can_queue  = MV_MAX_Q_DEPTH - 1,
.this_id= ATA_SHT_THIS_ID,
.sg_tablesize   = MV_MAX_SG_CT,
.cmd_per_lun= ATA_SHT_CMD_PER_LUN,
@@ -510,6 +512,7 @@ static const struct ata_port_operations mv5_ops = {
 
 static const struct ata_port_operations mv6_ops = {
.port_disable   = ata_port_disable,
+   .dev_config = mv6_dev_config,
 
.tf_load= ata_tf_load,
.tf_read= ata_tf_read,
@@ -590,26 +593,29 @@ static const struct ata_port_info mv_port_info[] = {
.port_ops   = mv5_ops,
},
{  /* chip_604x */
-   .flags  = MV_COMMON_FLAGS | MV_6XXX_FLAGS,
+   .flags  = MV_COMMON_FLAGS | MV_6XXX_FLAGS |
+ ATA_FLAG_NCQ,
.pio_mask   = 0x1f, /* pio0-4 */
.udma_mask  = ATA_UDMA6,
.port_ops   = mv6_ops,
},
{  /* chip_608x */
.flags  = MV_COMMON_FLAGS | MV_6XXX_FLAGS |
- MV_FLAG_DUAL_HC,
+ MV_FLAG_DUAL_HC | ATA_FLAG_NCQ,
.pio_mask   = 0x1f, /* pio0-4 */
.udma_mask  = ATA_UDMA6,
.port_ops   = mv6_ops,
},
{  /* chip_6042 */
-   .flags  = MV_COMMON_FLAGS | MV_6XXX_FLAGS,
+   .flags  = MV_COMMON_FLAGS | MV_6XXX_FLAGS |
+ ATA_FLAG_NCQ,
.pio_mask   = 0x1f, /* pio0-4 */
.udma_mask  = ATA_UDMA6,
.port_ops   = mv_iie_ops,
},
{  /* chip_7042 */
-   .flags  = MV_COMMON_FLAGS | MV_6XXX_FLAGS,
+   .flags  = MV_COMMON_FLAGS | MV_6XXX_FLAGS |
+ ATA_FLAG_NCQ,
.pio_mask   = 0x1f, /* pio0-4 */
.udma_mask  = ATA_UDMA6,
.port_ops   = mv_iie_ops,
@@ -808,18 +814,23 @@ static void mv_set_edma_ptrs(void __iomem *port_mmio,
  *  LOCKING:
  *  Inherited from caller.
  */
-static void mv_start_dma(void __iomem *base, struct mv_host_priv *hpriv,
+static void mv_start_dma(struct ata_port *ap, void __iomem *base,
 struct mv_port_priv *pp)
 {
if (!(pp-pp_flags

[PATCH] sata_qstor, pdc_adma, sata_sx4: convert to new EH

2007-07-23 Thread Jeff Garzik

This is just a refresh of the existing libata-dev.git#new-eh patches
that convert all remaining old-EH drivers to new EH, against 2.6.23-rc1.

All three conversions are completely untested.  pdc_adma and sata_qstor
need reviewing by someone with docs, in addition to testing.

Even it still works or this patch breaks stuff feedback from users
is useful.

Jeff




commit 99ad0b4cd2d73815db6370fa6f89d7053ca21016
Author: Jeff Garzik [EMAIL PROTECTED]
Date:   Mon May 28 06:21:45 2007 -0400

[libata] sata_sx4: convert to new EH

Signed-off-by: Jeff Garzik [EMAIL PROTECTED]

commit 9b105869fb953485ff7e7a8f9bb9f3dcae8aa502
Author: Jeff Garzik [EMAIL PROTECTED]
Date:   Sat May 26 19:48:07 2007 -0400

[libata] sata_qstor: rough draft conversion to new libata EH

Signed-off-by: Jeff Garzik [EMAIL PROTECTED]

commit 1a9161f86ef2ae955267c78f1c16273cad4fdbb4
Author: Jeff Garzik [EMAIL PROTECTED]
Date:   Fri Jul 6 19:28:32 2007 -0400

[libata] pdc_adma: rough draft conversion to new-EH

Signed-off-by: Jeff Garzik [EMAIL PROTECTED]

 drivers/ata/pdc_adma.c   |   82 
 drivers/ata/sata_qstor.c |   65 +++
 drivers/ata/sata_sx4.c   |   96 +--
 3 files changed, 174 insertions(+), 69 deletions(-)

diff --git a/drivers/ata/pdc_adma.c b/drivers/ata/pdc_adma.c
index bec1de5..bf4dba0 100644
--- a/drivers/ata/pdc_adma.c
+++ b/drivers/ata/pdc_adma.c
@@ -92,6 +92,8 @@ enum {
 
/* CPB bits */
cDONE   = (1  0),
+   cATERR  = (1  3),
+
cVLD= (1  0),
cDAT= (1  2),
cIEN= (1  3),
@@ -131,14 +133,15 @@ static int adma_ata_init_one (struct pci_dev *pdev,
 static int adma_port_start(struct ata_port *ap);
 static void adma_host_stop(struct ata_host *host);
 static void adma_port_stop(struct ata_port *ap);
-static void adma_phy_reset(struct ata_port *ap);
 static void adma_qc_prep(struct ata_queued_cmd *qc);
 static unsigned int adma_qc_issue(struct ata_queued_cmd *qc);
 static int adma_check_atapi_dma(struct ata_queued_cmd *qc);
 static void adma_bmdma_stop(struct ata_queued_cmd *qc);
 static u8 adma_bmdma_status(struct ata_port *ap);
 static void adma_irq_clear(struct ata_port *ap);
-static void adma_eng_timeout(struct ata_port *ap);
+static void adma_freeze(struct ata_port *ap);
+static void adma_thaw(struct ata_port *ap);
+static void adma_error_handler(struct ata_port *ap);
 
 static struct scsi_host_template adma_ata_sht = {
.module = THIS_MODULE,
@@ -165,12 +168,13 @@ static const struct ata_port_operations adma_ata_ops = {
.exec_command   = ata_exec_command,
.check_status   = ata_check_status,
.dev_select = ata_std_dev_select,
-   .phy_reset  = adma_phy_reset,
.check_atapi_dma= adma_check_atapi_dma,
.data_xfer  = ata_data_xfer,
.qc_prep= adma_qc_prep,
.qc_issue   = adma_qc_issue,
-   .eng_timeout= adma_eng_timeout,
+   .freeze = adma_freeze,
+   .thaw   = adma_thaw,
+   .error_handler  = adma_error_handler,
.irq_clear  = adma_irq_clear,
.irq_on = ata_irq_on,
.irq_ack= ata_irq_ack,
@@ -184,7 +188,7 @@ static const struct ata_port_operations adma_ata_ops = {
 static struct ata_port_info adma_port_info[] = {
/* board_1841_idx */
{
-   .flags  = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST |
+   .flags  = ATA_FLAG_SLAVE_POSS |
  ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO |
  ATA_FLAG_PIO_POLLING,
.pio_mask   = 0x10, /* pio4 */
@@ -273,24 +277,41 @@ static inline void adma_enter_reg_mode(struct ata_port 
*ap)
readb(chan + ADMA_STATUS);  /* flush */
 }
 
-static void adma_phy_reset(struct ata_port *ap)
+static void adma_freeze(struct ata_port *ap)
 {
-   struct adma_port_priv *pp = ap-private_data;
+   void __iomem *chan = ADMA_PORT_REGS(ap);
+
+   /* mask/clear ATA interrupts */
+   writeb(ATA_NIEN, ap-ioaddr.ctl_addr);
+   ata_check_status(ap);
+
+   /* reset ADMA to idle state */
+   writew(aPIOMD4 | aNIEN | aRSTADM, chan + ADMA_CONTROL);
+   udelay(2);
+   writew(aPIOMD4 | aNIEN, chan + ADMA_CONTROL);
+   udelay(2);
+}
 
-   pp-state = adma_state_idle;
+static void adma_thaw(struct ata_port *ap)
+{
adma_reinit_engine(ap);
-   ata_port_probe(ap);
-   ata_bus_reset(ap);
 }
 
-static void adma_eng_timeout(struct ata_port *ap)
+static int adma_prereset(struct ata_port *ap, unsigned long deadline)
 {
struct adma_port_priv *pp = ap-private_data

Re: [PATCH] pata_hpt37x: Fix 2.6.22 clock PLL regression

2007-07-24 Thread Jeff Garzik

Alan Cox wrote:

Just one version of Linux ago
The PLL code broke - oh no!
But set the right mode
And fix up the code
Makes the PLL timing sync go

Closes-bug: #8791
Signed-off-by: Alan Cox [EMAIL PROTECTED]


applied


-
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] pata_ali: Correct HP detect

2007-07-24 Thread Jeff Garzik

Alan Cox wrote:

Signed-off-by: Alan Cox [EMAIL PROTECTED]

diff -u --new-file --recursive --exclude-from /usr/src/exclude 
linux.vanilla-2.6.22-rc6-mm1/drivers/ata/pata_ali.c 
linux-2.6.22-rc6-mm1/drivers/ata/pata_ali.c
--- linux.vanilla-2.6.22-rc6-mm1/drivers/ata/pata_ali.c 2007-07-02 
20:50:11.0 +0100
+++ linux-2.6.22-rc6-mm1/drivers/ata/pata_ali.c 2007-07-19 10:11:43.0 
+0100
@@ -45,7 +45,7 @@
.ident = HP Pavilion N5430,
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, Hewlett-Packard),
-   DMI_MATCH(DMI_BOARD_NAME, OmniBook N32N-736),
+   DMI_MATCH(DMI_BOARD_VERSION, OmniBook N32N-736),


applied


-
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 2/2] ata_piix: fix suspend/resume for some TOSHIBA laptops

2007-07-24 Thread Jeff Garzik

Tejun Heo wrote:

+   /* Some braindamaged ACPI suspend implementations expect the
+* controller to be awake on entry; otherwise, it burns cpu
+* cycles and power trying to do something to the sleeping
+* beauty.
+*/



applied 1-2... HOWEVER...

I would not classify this as braindead.  I have applied these patches, 
but it must be emphasized that this is a temporary fix only.


Overall, it is unfortunately but libata must be aware of the state the 
controller should be in, for suspend and resume.  I bet some more 
suspend/resume problems can be isolated to a hardware state mismatch, 
where BIOS expects one thing but Linux has configured the hardware 
differently.


A more generalized rule to consider for the future would be to ensure 
that ALL suspend routines put the hardware back into its pre-Linux init 
mode before suspending.  i.e. that means if we turned on some enhanced 
mode, we must switch back to legacy mode before calling pci_xxx to 
suspend our device.


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: [PATCH 2/2] ata_piix: fix suspend/resume for some TOSHIBA laptops

2007-07-24 Thread Jeff Garzik

Alan Cox wrote:
A more generalized rule to consider for the future would be to ensure 
that ALL suspend routines put the hardware back into its pre-Linux init 
mode before suspending.  i.e. that means if we turned on some enhanced 
mode, we must switch back to legacy mode before calling pci_xxx to 
suspend our device.


This sounds good but for some hardware you can't get it back into that
state and there is no guarantee some laptops don't have ACPI suspend
paths that know Windows will have reconfigured the hardware.


Good point.  To generalize a bit more:  it is quite possible that many 
situations will require us to put the hardware device into a certain 
mode before suspending, a mode that Linux may not currently be operating 
in.  ata_piix is definitely not going to be the only one needing this 
change, long term.


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: [PATCH] pata_cmd64x: Correct the speed ranges

2007-07-26 Thread Jeff Garzik

Sergei Shtylyov wrote:
   Note that the olde driver has MWDMA fixed, and the new one has it 
still borken, yet MWDMA2 is the mode you're using.



What about MWDMA is broken?

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


Please pull for stable ATA

2007-07-26 Thread Jeff Garzik

Please pull

commit fe36cb53cfd82f3c0796a0826e1c9caf198c8f97
Author: Petr Vandrovec [EMAIL PROTECTED]
Date:   Fri Jul 20 07:44:44 2007 -0400

[libata] Fix reported task file values in sense data

into the 2.6.22 stable tree.

-
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


<    4   5   6   7   8   9   10   11   12   13   >