Re: [PATCH] pata_cmd64x: Correct the speed ranges

2007-07-27 Thread Jeff Garzik

Sergei Shtylyov wrote:

Hello.

Jeff Garzik 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?


   The code that sets MWDMA timings is completely bogus -- I've 
already reported that before. And now I've fixed this in the old IDE 
driver at last.


In what way is it completely bogus?

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: make CONFIG_IDE_GENERIC default to N

2007-07-27 Thread Jeff Garzik

Tejun Heo wrote:

These days, CONFIG_IDE_GENERIC causes more confusion and
misconfiguration than it helps.  Especially so because libata is
linked after the generic driver.  Default to N.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
---
 drivers/ide/Kconfig |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig
index b1a9b81..8113909 100644
--- a/drivers/ide/Kconfig
+++ b/drivers/ide/Kconfig
@@ -304,9 +304,9 @@ comment IDE chipset support/bugfixes
 
 config IDE_GENERIC

tristate generic/default IDE chipset support
-   default y
+   default n
help
- If unsure, say Y.
+ If unsure, say N.


I don't know if we want to get this nit-picky, but you could probably 
just delete the default y line for the same effect.


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 1/4] libata: ACPI checks for 80wire cable

2007-07-27 Thread Jeff Garzik

Alan Cox wrote:

We can use the ACPI mode information with several drivers as a hint to
cable type. If the ACPI mode set by the BIOS is faster than UDMA33 then
we know the BIOS thinks there are 80wire cables. If it doesn't set such a
mode or it has no ACPI method then we get no further information and can
rely on existing approaches

Introduce the function headers needed. Null it out for non ACPI boxes

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


I like this patchset.

This is the direction we need to be following.

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: make CONFIG_IDE_GENERIC default to N

2007-07-28 Thread Jeff Garzik

Tejun Heo wrote:

These days, CONFIG_IDE_GENERIC causes more confusion and
misconfiguration than it helps.  Especially so because libata is
linked after the generic driver.  Default to N.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
---
Aye, aye.

 drivers/ide/Kconfig |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig
index b1a9b81..0a801c6 100644
--- a/drivers/ide/Kconfig
+++ b/drivers/ide/Kconfig
@@ -304,9 +304,8 @@ comment IDE chipset support/bugfixes
 
 config IDE_GENERIC

tristate generic/default IDE chipset support
-   default y
help
- If unsure, say Y.
+ If unsure, say N.


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] fix IDE legacy mode resource

2007-07-28 Thread Jeff Garzik

Yoichi Yuasa wrote:

Hi,

I got the following error on MIPS Cobalt.
MIPS Cobalt has the 0x1000 offset between resource and bus region. 


PCI: Unable to reserve I/O region #1:[EMAIL PROTECTED] for device :00:09.1
pata_via :00:09.1: failed to request/iomap BARs for port 0 (errno=-16)
PCI: Unable to reserve I/O region #3:[EMAIL PROTECTED] for device :00:09.1
pata_via :00:09.1: failed to request/iomap BARs for port 1 (errno=-16)
pata_via :00:09.1: no available native port

At this point, these resources should be the bus regions.

Signed-off-by: Yoichi Yuasa [EMAIL PROTECTED]


I'm not sure I understand what's going on here... could you or someone 
provide additional explanation as to why this is a fix?


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 2/4] Expose Power Management Policy option to users

2007-07-30 Thread Jeff Garzik

Kristen Carlson Accardi wrote:

@@ -42,6 +42,16 @@ enum scsi_eh_timer_return {
EH_RESET_TIMER,
 };
 
+/*

+ * shost pm policy: If you alter this, you also need to alter scsi_sysfs.c
+ * (for the ascii descriptions)
+ */
+enum scsi_host_link_pm {
+   SHOST_NOT_AVAILABLE,
+   SHOST_MIN_POWER,
+   SHOST_MAX_PERFORMANCE,
+   SHOST_MEDIUM_POWER,
+};
 
 struct scsi_host_template {

struct module *module;
@@ -345,6 +355,12 @@ struct scsi_host_template {
int (*suspend)(struct scsi_device *, pm_message_t state);
 
 	/*

+* link power management support
+*/
+   int (*set_link_pm_policy)(struct Scsi_Host *, enum scsi_host_link_pm);
+   enum scsi_host_link_pm default_link_pm_policy;
+
+   /*
 * Name of proc directory
 */
char *proc_name;
@@ -642,6 +658,7 @@ struct Scsi_Host {

 
 	enum scsi_host_state shost_state;

+   enum scsi_host_link_pm shost_link_pm_policy;
 
 	/* ldm bits */

struct device   shost_gendev;



Any chance the SCSI peeps could ACK this, and then let me include it in 
the ALPM patchset in the libata tree?


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

2007-08-01 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 },


Is this still a test patch, or can it go upstream?

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: Early ATA devices

2007-08-01 Thread Jeff Garzik

Alan Cox wrote:

#1  We assume identify works. Early ATA actually lists this command
as optional


ITYM we assume identify command exists on the device?

We certainly do not assume IDENTIFY command, if exists, succeeds.

What is the proper probing method -- notice if command-aborted is 
returned and do something from there?




#2  We don't allow for INIT_DEV_PARAMS failing which it may do on
some early IDE pre ATA devices


Suggested handling?  Ignore device, since we don't know what state its 
in, if this fails?




We check ATA  4 || non-LBA capable when deciding whether to issue
INIT_DEV_PARAMS. ATA 4+ however mandate LBA so the second case isn't
theoretically at least possible.


I agree, though I figured that the current code was more robust, in case 
some weirdo device decided to forget its LBA-ness.


No strong opinions here, though.



So in theory we can persuade libata to drive original MFM/RLL disks with
relatively few changes


Crazy :)

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_sis: fix MWDMA for = UDMA66 chipsets and UDMA for UDMA33 chipsets

2007-08-01 Thread Jeff Garzik

Bartlomiej Zolnierkiewicz wrote:

* Fix MWDMA timings setup in sis_old_set_dmamode() and sis_66_set_dmamode().

  The old timings were overclocked (even worse behavior than sis5513 IDE driver
  which depends on BIOS to program correct timings), the new timings are taken
  from the datasheet (they match timings from ATA spec).

* Fix UDMA timings setup in sis_old_set_dmamode().

  Misplaced pci_write_config_word() call resulted in UDMA timings never
  being set.

* Fix comments for sis_133_early_set_dmamode() and sis_133_set_dmamode():
  - only the former function handles early SiS 961 bridges
  - both functions lack MWDMA timings setup

* Fix typos in sis_100_set_piomode() and sis_133_set_piomode() comments.

* Bump driver version.

Cc: Alan Cox [EMAIL PROTECTED]
Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
---
Sergei: Yes, I'm working on sis5513 IDE driver. :)

 drivers/ata/pata_sis.c |   20 +---
 1 file changed, 9 insertions(+), 11 deletions(-)


applied to #upstream-fixes


-
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: blacklist SAMSUNG HD401LJ / ZZ100-15 for NCQ

2007-08-01 Thread Jeff Garzik

Tejun Heo wrote:

SAMSUNG HD401LJ / ZZ100-15 does spurious completion of NCQ commands.
Disable NCQ.  Reported by Ulrich in bugzilla #8805.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
Cc: Ulrich [EMAIL PROTECTED]
---
And, finally one from samsung.  How come vendors got this right
previously but screw up on new ones?

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


applied to #upstream-fixes


-
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] pci: rename __pci_reenable_device() to pci_reenable_device()

2007-08-01 Thread Jeff Garzik

Tejun Heo wrote:

Rename __pci_reenable_device() to pci_reenable_device().

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
---
Jeff, Greg wanted to drop the preceding underscores before exporting
the function and the updated patch was posted but the earlier version
was applied.  This patch renames the function.


applied these three to #upstream-fixes


-
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/4] Store interrupt value

2007-08-01 Thread Jeff Garzik

Kristen Carlson Accardi wrote:

Use a stored value for which interrupts to enable.  Changing this allows
us to selectively turn off certain interrupts later and have them 
stay off.


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


ACK.  Regenerate against current kernel and I'll apply immediately 
(tried to do so just now)



-
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 UPDATED] libata: add support for ATA_16 on ATAPI

2007-08-01 Thread Jeff Garzik

Tejun Heo wrote:

From: Mark Lord [EMAIL PROTECTED]

Add support for issuing ATA_16 passthru commands to ATAPI devices
managed by libata.  It requires the previous CDB length fix patch.

A boot/module parameter, atapi_scmd85=1 can be used to globally
disable this feature, if ever desired.

tj: renamed ata16_passthru module param to atapi_scmd85 to reduce
confusion

tj: restructured __ata_scsi_queuecmd() according to Jeff's suggestion.

Signed-off-by: Mark Lord [EMAIL PROTECTED]
Signed-off-by: Tejun Heo [EMAIL PROTECTED]
---
Jeff, Mark, are you guys okay with the modified version?


Close!  Thanks for revising!

My only comment now is that I dislike atapi_scmd85.  That means nothing 
to me.


I liked the old name better.  Or maybe use atapi_passthru16.

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-08-01 Thread Jeff Garzik

Alan Cox wrote:

I must have been half asleep when doing the original code

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


applied to #upstream-fixes


-
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-sff; Unbreak non DMA capable controllers again

2007-08-01 Thread Jeff Garzik

Alan Cox wrote:

Seems nobody else is checking/testing this case as it keeps getting
horked.

If we have no BAR4 mapping on an SFF controller this is *NOT* an error,
it just means it isn't doing BMDMA.

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


applied to #upstream-fixes


-
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-08-01 Thread Jeff Garzik

The only notable: GregKH wanted the pci_reenable_device() change
associated with ata_piix to go in before the release, to avoiding
release with an imperfect API.

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/ata_piix.c|   74 +
 drivers/ata/libata-core.c |1 +
 drivers/ata/libata-sff.c  |4 ++
 drivers/ata/pata_cmd64x.c |8 ++--
 drivers/ata/pata_sis.c|   20 +---
 drivers/pci/pci-driver.c  |2 +-
 drivers/pci/pci.c |7 ++--
 include/linux/pci.h   |2 +-
 8 files changed, 64 insertions(+), 54 deletions(-)

Alan Cox (2):
  pata_cmd64x: Correct the speed ranges
  libata-sff; Unbreak non DMA capable controllers again

Bartlomiej Zolnierkiewicz (1):
  pata_sis: fix MWDMA for = UDMA66 chipsets and UDMA for UDMA33 chipsets

Tejun Heo (4):
  pci: rename __pci_reenable_device() to pci_reenable_device()
  ata_piix: implement piix_borken_suspend()
  ata_piix: add Tecra M3 to broken suspend blacklist
  libata: blacklist SAMSUNG HD401LJ / ZZ100-15 for NCQ

diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index ad07086..a78832e 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -890,37 +890,46 @@ static void ich_set_dmamode (struct ata_port *ap, struct 
ata_device *adev)
 }
 
 #ifdef CONFIG_PM
-static struct dmi_system_id piix_broken_suspend_dmi_table[] = {
-   {
-   .ident = TECRA M5,
-   .matches = {
-   DMI_MATCH(DMI_SYS_VENDOR, TOSHIBA),
-   DMI_MATCH(DMI_PRODUCT_NAME, TECRA M5),
-   },
-   },
-   {
-   .ident = Satellite U200,
-   .matches = {
-   DMI_MATCH(DMI_SYS_VENDOR, TOSHIBA),
-   DMI_MATCH(DMI_PRODUCT_NAME, Satellite U200),
+static int piix_broken_suspend(void)
+{
+   static struct dmi_system_id sysids[] = {
+   {
+   .ident = TECRA M5,
+   .matches = {
+   DMI_MATCH(DMI_SYS_VENDOR, TOSHIBA),
+   DMI_MATCH(DMI_PRODUCT_NAME, TECRA M5),
+   },
},
-   },
-   {
-   .ident = Satellite U205,
-   .matches = {
-   DMI_MATCH(DMI_SYS_VENDOR, TOSHIBA),
-   DMI_MATCH(DMI_PRODUCT_NAME, Satellite U205),
+   {
+   .ident = Satellite U205,
+   .matches = {
+   DMI_MATCH(DMI_SYS_VENDOR, TOSHIBA),
+   DMI_MATCH(DMI_PRODUCT_NAME, Satellite U205),
+   },
},
-   },
-   {
-   .ident = Portege M500,
-   .matches = {
-   DMI_MATCH(DMI_SYS_VENDOR, TOSHIBA),
-   DMI_MATCH(DMI_PRODUCT_NAME, PORTEGE M500),
+   {
+   .ident = Portege M500,
+   .matches = {
+   DMI_MATCH(DMI_SYS_VENDOR, TOSHIBA),
+   DMI_MATCH(DMI_PRODUCT_NAME, PORTEGE M500),
+   },
},
-   },
-   { }
-};
+   { }
+   };
+   static const char *oemstrs[] = {
+   Tecra M3,,
+   };
+   int i;
+
+   if (dmi_check_system(sysids))
+   return 1;
+
+   for (i = 0; i  ARRAY_SIZE(oemstrs); i++)
+   if (dmi_find_device(DMI_DEV_TYPE_OEM_STRING, oemstrs[i], NULL))
+   return 1;
+
+   return 0;
+}
 
 static int piix_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)
 {
@@ -937,8 +946,7 @@ static int piix_pci_device_suspend(struct pci_dev *pdev, 
pm_message_t mesg)
 * cycles and power trying to do something to the sleeping
 * beauty.
 */
-   if (dmi_check_system(piix_broken_suspend_dmi_table) 
-   mesg.event == PM_EVENT_SUSPEND) {
+   if (piix_broken_suspend()  mesg.event == PM_EVENT_SUSPEND) {
pci_save_state(pdev);
 
/* mark its power state as unknown, since we don't
@@ -973,10 +981,10 @@ static int piix_pci_device_resume(struct pci_dev *pdev)
pci_restore_state(pdev);
 
/* PCI device wasn't disabled during suspend.  Use
-* __pci_reenable_device() to avoid affecting the
-* enable count.
+* pci_reenable_device() to avoid affecting the enable
+* count.
 */
-   rc = __pci_reenable_device(pdev);
+   rc = pci_reenable_device(pdev);
if (rc)
dev_printk(KERN_ERR, pdev-dev, failed to enable 
   device after resume 

[PATCH] pata_isapnp: use MODULE_DEVICE_TABLE()

2007-08-02 Thread Jeff Garzik

I found this while doing ISDN PCI API conversions...  I presume this
omission was not intentional?

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


diff --git a/drivers/ata/pata_isapnp.c b/drivers/ata/pata_isapnp.c
index 5525518..91a396f 100644
--- a/drivers/ata/pata_isapnp.c
+++ b/drivers/ata/pata_isapnp.c
@@ -139,6 +139,8 @@ static struct pnp_device_id isapnp_devices[] = {
{.id = }
 };
 
+MODULE_DEVICE_TABLE(pnp, isapnp_devices);
+
 static struct pnp_driver isapnp_driver = {
.name   = DRV_NAME,
.id_table   = isapnp_devices,
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Libata Sil3124 hybrid drive failure

2007-08-02 Thread Jeff Garzik

Fajun Chen wrote:

Does anyone know if libata supports hybrid drive on Sil3124? I tried
to play with Seagate hybrid drive and got protocol mismatch error when
adding LBAs to pinned set or querying pinned set?  Sil24 driver code
does not set Protocol Override field in PRB, just wonder if we need to
set protocol explicitly to get this work because the controller may
not decode the protocol correctly for nv cache commands.


Yes, that's entirely possible for new commands...

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] sata_qstor, pdc_adma, sata_sx4: convert to new EH

2007-08-03 Thread Jeff Garzik

Tejun Heo wrote:

Jeff Garzik wrote:

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.


pdc_adma works fine.  Tested both a harddrive and a cdrom.  ATAPI check
sense seems to work and harddrive was successfully recovered from
timeout induced by shaking the harddisk for 30s.  :-)


Thanks!  I'll push pdc_adma new-EH conversion into #upstream.

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


libata git tree, mbox queue status and contents

2007-08-03 Thread Jeff Garzik
This is a quick guide to current libata work that is queued or in 
progress in some way, shape or form.


First, a guide to the branches currently in use in 
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git


  ALL

Everything that is exported for testing (and akpm's -mm tree). 
Currently consists of upstream-fixes + upstream + sil680-mmio branches.



  master

Vanilla upstream linux-2.6.git tree.


  mv-ahci-pata

Marvell 6121/6141 PATA support.  Needs fixing in the 'PATA controller 
command' area before it is usable, and can go upstream.



  mv-ncq

sata_mv NCQ support.  Code is complete and /should/ be working, but it 
does nothing but timeout and fallback to non-NCQ here.  Needs debugging 
before can go upstream.



  new-eh

Convert sata_qstor and sata_sx4 to new EH.  Each needs 
testing/verification before it can go upstream.



  pmask

Add proto_mask to LLDDs, alongside pio_mask, udma_mask, etc.


  sii-lbt

Enable Large Block Transfer mode on sata_sil.  Verified to work locally, 
but some bug reports on the 'net need to be tracked down before this can 
go upstream.



  sil680-mmio

BenH's MMIO patch for pata_sil680.  Some MMIO/flushing type issues were 
raised on the list, a solution was reached.  That solution must be coded 
before this can go upstream.



  upstream

Everything queued for 2.6.24.  Includes everything in upstream-fixes.


  upstream-fixes

Everything queued for 2.6.23-rc.  This tends to go upstream rapidly.




mbox queue, prefixed by author:

* Kristen: ALPM patches.  We definitely want them, as they save a ton of 
power.


* Tony Vroon: LED trigger  hmmm

* Alan: IORDY handling -- upstream whenever Alan is happy

* Tejun: improved probe info printout.  Want to test and review in 
depth, but probably OK


* Alan: ACPI checks for 80wire cable -- upstream whenever Alan is happy

* Tejun:  Port Multiplier Support -- I still need to review in depth, 
but would like go ahead and push ata_link in


* NVIDIA: sata_nv SW NCQ: need to review WRT FIS state machine, though I 
saw some flaws in there.  OK if that is OK.


* Albert: irq_on/off.  Really need to give this some thought.  Not sure 
I like where this model is going.  Polling and twiddling irq on/off 
should be kept to a minimum, because it's sorta an admission that the 
host state machine has broken down, and we need to bandaid.  Its a 
bandaid not a root-cause solution.


* Albert: minor PIO fixes.  Need to review in depth.

* Kristen: AN: it seems that things got stuck once Al Viro voiced an 
objection?


* Ben Collins: cleanup HPA support.  Need to review and see what's 
needed today, from this patch.


-
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: implement BROKEN_HPA horkage and apply it to HDS724040KLSA80

2007-08-07 Thread Jeff Garzik

People should check out Ben C's HPA fixes and cleanups, too. (attached)

I was hoping one of the original libata HPA authors would review that in 
depth and integrate.  (it no longer applies cleanly)


Jeff




From: Ben Collins [EMAIL PROTECTED]

The original HPA patch that Kyle worked on has gone into current git
without some fixes that we worked through late in the Ubuntu feisty
release.  Here's the main copy of the notes I sent to Alan a few weeks ago
in regards to the original patch, and a repatch against current git to fix
things up.  Note we have released feisty with the patch attached (albeit we
have HPA enabled by default), and we have not had any reports directly
attributed to it.  However, in gutsy (devel for next release, based on
current stock linux-2.6.git), we are already seeing reports of the same
issues we already fixed.

The issues we saw were mainly that some controllers didn't return the
correct size from the SET_MAX command (sata_nv is a good example).  So I
added a re IDENTIFY after the SET_MAX, and compared all the numbers.  If
re-id was correct, but return value from SET_MAX wasn't we print a warning
and use the IDENTIFY value regardless (since that's what the device is
going to use).

ata_hpa_resize() was changed to handle everything in a single call (checks
for HPA support of the device, and whether ignore_hpa is set or not), and
it also sets dev-n_sectors before returning.

So far with this patch, we were able to fix all the problems we were seeing
with it (except the sata_nv issue where we had to revert to not using adma
for NO_DATA transactions, already reported to libata-dev).  We've not had
any reports of further problems.

Cc: Kyle McMartin [EMAIL PROTECTED]
Signed-off-by: Ben Collins [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
---

 drivers/ata/libata-core.c |  140 +---
 1 files changed, 100 insertions(+), 40 deletions(-)

diff -puN drivers/ata/libata-core.c~cleanup-libata-hpa-support 
drivers/ata/libata-core.c
--- a/drivers/ata/libata-core.c~cleanup-libata-hpa-support
+++ a/drivers/ata/libata-core.c
@@ -819,16 +819,19 @@ void ata_id_c_string(const u16 *id, unsi
 
 static u64 ata_tf_to_lba48(struct ata_taskfile *tf)
 {
-   u64 sectors = 0;
+   u64 sectors;
+   u32 high, low;
 
-   sectors |= ((u64)(tf-hob_lbah  0xff))  40;
-   sectors |= ((u64)(tf-hob_lbam  0xff))  32;
-   sectors |= (tf-hob_lbal  0xff)  24;
-   sectors |= (tf-lbah  0xff)  16;
-   sectors |= (tf-lbam  0xff)  8;
-   sectors |= (tf-lbal  0xff);
+   high = (tf-hob_lbah  16) |
+  (tf-hob_lbam   8) |
+   tf-hob_lbal;
+   low  = (tf-lbah  16) |
+  (tf-lbam   8) |
+   tf-lbal;
 
-   return ++sectors;
+   sectors = ((u64)high  24) | low;
+
+   return sectors + 1;
 }
 
 static u64 ata_tf_to_lba(struct ata_taskfile *tf)
@@ -970,52 +973,107 @@ static u64 ata_set_native_max_address(st
 }
 
 /**
+ * ata_hpa_get_native_size -   Get the native size of a disk
+ * @dev: Device to get the size for
+ *
+ * Read the size of an LBA28 or LBA48 disk with HPA features and
+ * return the native size. Caller must check that the drive has HPA
+ * feature set enabled.
+ */
+static u64 ata_hpa_get_native_size(struct ata_device *dev)
+{
+   if (ata_id_has_lba48(dev-id))
+   return ata_read_native_max_address_ext(dev);
+   else
+   return ata_read_native_max_address(dev);
+}
+
+
+static u64 ata_hpa_set_native_size(struct ata_device *dev, u64 new_sectors)
+{
+   if (ata_id_has_lba48(dev-id))
+   return ata_set_native_max_address_ext(dev, new_sectors);
+   else
+   return ata_set_native_max_address(dev, new_sectors);
+}
+
+static unsigned long long sectors_to_MB(unsigned long long n)
+{
+   n = 9;/* make it bytes */
+   do_div(n, 100); /* make it MB */
+   return n;
+}
+
+static u64 ata_id_n_sectors(const u16 *id);
+
+/**
  * ata_hpa_resize  -   Resize a device with an HPA set
  * @dev: Device to resize
  *
  * Read the size of an LBA28 or LBA48 disk with HPA features and resize
- * it if required to the full size of the media. The caller must check
- * the drive has the HPA feature set enabled.
+ * it if required to the full size of the media.
  */
 
-static u64 ata_hpa_resize(struct ata_device *dev)
+static int ata_hpa_resize(struct ata_device *dev)
 {
-   u64 sectors = dev-n_sectors;
u64 hpa_sectors;
 
-   if (ata_id_has_lba48(dev-id))
-   hpa_sectors = ata_read_native_max_address_ext(dev);
-   else
-   hpa_sectors = ata_read_native_max_address(dev);
+   if (!ata_id_hpa_enabled(dev-id))
+   return 0;
+
+   hpa_sectors = ata_hpa_get_native_size(dev);
 
-   /* if no hpa, both should be equal */
-   ata_dev_printk(dev, KERN_INFO, %s 1: sectors = 

Re: [PATCH] libata: implement BROKEN_HPA horkage and apply it to HDS724040KLSA80

2007-08-07 Thread Jeff Garzik

Alan Cox wrote:

On Tue, 07 Aug 2007 11:47:38 -0400
Jeff Garzik [EMAIL PROTECTED] wrote:


People should check out Ben C's HPA fixes and cleanups, too. (attached)

I was hoping one of the original libata HPA authors would review that in 
depth and integrate.  (it no longer applies cleanly)


Looks basically sound but we should still probably move over this bit of
the old IDE paranoia as well:


Oh quite agreed...

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 1/1] AVR32 PATA driver

2007-08-07 Thread Jeff Garzik

Kristoffer Nyborg Gregertsen wrote:

On Tuesday 07 August 2007 17:54:09 Alan Cox wrote:

 +static int pata_at32_get_pio_mask(void)


+{
+   switch (max_pio) {
+   case 0:
+   return 0x01;
+   case 1:
+   return 0x03;
+   case 2:
+   return 0x07;
+   case 3:
+   return 0x0f;
+   case 4:
+   return 0x1f;
+   default:
+   return 0x01;

What is wrong with just using  (1  max_pio) - 1 as the range is only
0-4 anyway.


Since max_pio is a module argument it may be invalid. Perhaps:

if (0 = max_pio  max_pio = 4)
return (1  max_pio) - 1;
else
return 0x01;

Or is it common to trust the module arguments to be sane?


Well, a higher level issue, you should not have a max_pio module 
parameter at all.  Other drivers do not have such a thing.


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 1/2] pata_hpt37x: actually clock HPT374 by 50 MHz DPLL

2007-08-07 Thread Jeff Garzik

Alan Cox wrote:

/* Compute DPLL */
-   dpll = 2;
-   if (port-udma_mask  0xE0)
-   dpll = 3;
+   dpll = (port-udma_mask  0xC0) ? 3 : 2;


Gak, I'd much rather people kept to the nice easy to read if() but fine

is_author_p()?Signed-off-by:Acked-by Alan Cox [EMAIL PROTECTED]


Does your ACK stand, even though it still locks up for Bob Ham?

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: update map 10b for ich8m

2007-08-07 Thread Jeff Garzik

Tejun Heo wrote:

Fix map entry 10b for ich8.  It's [P0 P2 IDE IDE] like ich6 / ich6m.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
Cc: Kristen Carlson Accardi [EMAIL PROTECTED]
---
Many users can be hit by this.  Please consider for -stable.  Thanks.

 drivers/ata/ata_piix.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


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


[git patches] libata fixes

2007-08-07 Thread Jeff Garzik

The only non-fix are two sata_mv PCI ID additions.

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/ata_piix.c|2 +-
 drivers/ata/pata_isapnp.c |2 ++
 drivers/ata/sata_mv.c |3 +++
 3 files changed, 6 insertions(+), 1 deletions(-)

Alan Cox (1):
  sata_mv: PCI IDs for Hightpoint RocketRaid 1740/1742

Jeff Garzik (1):
  [libata] pata_isapnp: replace missing module device table

Tejun Heo (1):
  ata_piix: update map 10b for ich8m

diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index a78832e..c5b4509 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -436,7 +436,7 @@ static const struct piix_map_db ich8_map_db = {
/* PM   PS   SM   SS   MAP */
{  P0,  P2,  P1,  P3 }, /* 00b (hardwired when in AHCI) */
{  RV,  RV,  RV,  RV },
-   {  IDE,  IDE,  NA,  NA }, /* 10b (IDE mode) */
+   {  P0,  P2, IDE, IDE }, /* 10b (IDE mode) */
{  RV,  RV,  RV,  RV },
},
 };
diff --git a/drivers/ata/pata_isapnp.c b/drivers/ata/pata_isapnp.c
index 5525518..91a396f 100644
--- a/drivers/ata/pata_isapnp.c
+++ b/drivers/ata/pata_isapnp.c
@@ -139,6 +139,8 @@ static struct pnp_device_id isapnp_devices[] = {
{.id = }
 };
 
+MODULE_DEVICE_TABLE(pnp, isapnp_devices);
+
 static struct pnp_driver isapnp_driver = {
.name   = DRV_NAME,
.id_table   = isapnp_devices,
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 8ec5208..3acf65e 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -621,6 +621,9 @@ static const struct pci_device_id mv_pci_tbl[] = {
{ 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 },
 
{ PCI_VDEVICE(MARVELL, 0x6040), chip_604x },
{ PCI_VDEVICE(MARVELL, 0x6041), chip_604x },
-
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/2] pata_hpt37x: actually clock HPT374 by 50 MHz DPLL

2007-08-07 Thread Jeff Garzik

Alan Cox wrote:

On Tue, 07 Aug 2007 20:49:34 -0400
Jeff Garzik [EMAIL PROTECTED] wrote:


Alan Cox wrote:

/* Compute DPLL */
-   dpll = 2;
-   if (port-udma_mask  0xE0)
-   dpll = 3;
+   dpll = (port-udma_mask  0xC0) ? 3 : 2;

Gak, I'd much rather people kept to the nice easy to read if() but fine

is_author_p()?Signed-off-by:Acked-by Alan Cox [EMAIL PROTECTED]

Does your ACK stand, even though it still locks up for Bob Ham?



Its a real fix for a real bug. The 374 needs a bit more stuff which is
sitting in my tree and I'll push for Sergei to comment tomorrow



OK, thanks.  Do you also ACK

[PATCH 2/2] pata_hpt{37x|3x2n}: fix clock reporting

?

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: libata git tree, mbox queue status and contents

2007-08-08 Thread Jeff Garzik

Mark Lord wrote:

Jeff,

This patch (below) is needed by WD drives that powerup-in-standby.


drivers/ata/libata-core.c~libata-adjust-libata-to-ignore-errors-after 
drivers/ata/libata-core.c

--- a/drivers/ata/libata-core.c~libata-adjust-libata-to-ignore-errors-after
+++ a/drivers/ata/libata-core.c
@@ -1723,7 +1723,7 @@ int ata_dev_read_id(struct ata_device *d
tf.protocol = ATA_PROT_NODATA;
tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
err_mask = ata_exec_internal(dev, tf, NULL, DMA_NONE, NULL, 0);
-if (err_mask) {
+if (err_mask  id[2] != 0x738c) {
rc = -EIO;
reason = SPINUP failed;
goto err_out;



Thanks for the poke, it wasn't in my queue.

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 01/14] libata-link: introduce ata_link

2007-08-15 Thread Jeff Garzik

Tejun Heo wrote:

Introduce ata_link.  It abstracts PHY and sits between ata_port and
ata_device.  This new level of abstraction is necessary to support
SATA Port Multiplier, which basically adds a bunch of links (PHYs) to
a ATA host port.  Fields related to command execution, spd_limit and
EH are per-link and thus moved to ata_link.

This patch only defines the host link.  Multiple link handling will be
added later.  Also, a lot of ap-link derefences are added but many of
them will be removed as each part is converted to deal directly with
ata_link instead of ata_port.

This patch introduces no behavior change.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
Cc: James Bottomley [EMAIL PROTECTED]
---
 drivers/ata/ahci.c|   18 +++---
 drivers/ata/ata_generic.c |2 +-
 drivers/ata/libata-acpi.c |   21 +++---
 drivers/ata/libata-core.c |  157 ++---
 drivers/ata/libata-eh.c   |  100 +-
 drivers/ata/libata-scsi.c |   41 ++-
 drivers/ata/libata-sff.c  |4 +-
 drivers/ata/pata_it821x.c |4 +-
 drivers/ata/pata_ixp4xx_cf.c  |4 +-
 drivers/ata/pata_legacy.c |4 +-
 drivers/ata/pata_optidma.c|4 +-
 drivers/ata/pata_pcmcia.c |4 +-
 drivers/ata/pata_pdc2027x.c   |2 +-
 drivers/ata/pata_platform.c   |2 +-
 drivers/ata/pata_qdi.c|2 +-
 drivers/ata/pata_rz1000.c |2 +-
 drivers/ata/pata_scc.c|2 +-
 drivers/ata/pata_sis.c|2 +-
 drivers/ata/pata_winbond.c|2 +-
 drivers/ata/pdc_adma.c|9 ++-
 drivers/ata/sata_inic162x.c   |7 +-
 drivers/ata/sata_mv.c |   14 ++--
 drivers/ata/sata_nv.c |   26 
 drivers/ata/sata_promise.c|6 +-
 drivers/ata/sata_qstor.c  |4 +-
 drivers/ata/sata_sil.c|   14 ++--
 drivers/ata/sata_sil24.c  |   14 ++--
 drivers/ata/sata_sx4.c|4 +-
 drivers/ata/sata_via.c|2 +-
 drivers/ata/sata_vsc.c|2 +-
 drivers/scsi/ipr.c|6 +-
 drivers/scsi/libsas/sas_ata.c |   10 ++--
 include/linux/libata.h|   40 +++
 33 files changed, 280 insertions(+), 255 deletions(-)


applied 1-14 to #upstream


-
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: Correct IORDY handling

2007-08-15 Thread Jeff Garzik

Alan Cox wrote:

Debugging a report of a problem with an ancient solid state disk showed
up some problems in the IORDY handling

1.  We check the wrong bit to see if the device has IORDY
2.  Even then some ancient creaking piles of crap don't support
SETXFER at all.

I think this should go via -mm for a bit. The cases it fixes are obscure
and the risk of side effects is slight but possible. This also moves us
slightly closer to supporting original MFM/RLL disks with libata but
before Jeff panics I have no plans to do that

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 1/2] libata: move ata_altstatus() to pio data xfer functions

2007-08-15 Thread Jeff Garzik

Albert Lee wrote:

Patch 1/2:
 Move ata_altstatus() out from ata_hsm_move() to the pio data xfer functions
like ata_pio_sectors() and atapi_pio_bytes() where it makes more sense.

Signed-off-by: Albert Lee [EMAIL PROTECTED]
---
atapi_send_cdb() already calls ata_altstatus() inside.
This patch makes ata_pio_sectors() and atapi_pio_bytes() do the same.


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 RE-UPDATED] libata: add support for ATA_16 on ATAPI

2007-08-15 Thread Jeff Garzik

Tejun Heo wrote:

From: Mark Lord [EMAIL PROTECTED]

Add support for issuing ATA_16 passthru commands to ATAPI devices
managed by libata.  It requires the previous CDB length fix patch.

A boot/module parameter, atapi_scmd85=1 can be used to globally
disable this feature, if ever desired.

tj: renamed ata16_passthru module param to atapi_passthru16 and invert
its meaning to reduce confusion.

tj: restructured __ata_scsi_queuecmd() according to Jeff's suggestion.

Signed-off-by: Mark Lord [EMAIL PROTECTED]
Signed-off-by: Tejun Heo [EMAIL PROTECTED]
---
Alright, the winner is atapi_passthru16.

 drivers/ata/libata-core.c |4 +++
 drivers/ata/libata-scsi.c |   52 +++---
 drivers/ata/libata.h  |1 
 3 files changed, 41 insertions(+), 16 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] libata-core: Document some limits/assumptions about ID_ATA

2007-08-15 Thread Jeff Garzik

Alan Cox wrote:

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] libata: Note that our cache flush code needs fixing up

2007-08-15 Thread Jeff Garzik

Alan Cox wrote:

Remembered this while doing auditing and code review versus the specs

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 24/25] pata_cmd64x: Set up MWDMA modes properly

2007-08-15 Thread Jeff Garzik

[EMAIL PROTECTED] wrote:

From: Alan Cox [EMAIL PROTECTED]

Set the MWDMA timing by updating the correct registers.  Split the PIO path as
this is mostly shared code.  Wants testing.

Signed-off-by: Alan Cox [EMAIL PROTECTED]
Tested-by: Mikael Pettersson [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
---

 drivers/ata/pata_cmd64x.c |   37 +---
 1 files changed, 26 insertions(+), 11 deletions(-)


applied

not sure why Alan's original patch did not apply, but this one did


-
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 4/4] libata: send event when AN received

2007-08-15 Thread Jeff Garzik

applied the attached slightly modified patch.  main changes:

* SCSI stuff has not been applied yet, so libata's notify is a no-op for now

* fixed endian bug in SDB FIS handling


diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 757369e..c41bd2c 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1366,6 +1366,30 @@ static void ahci_port_intr(struct ata_port *ap)
return;
}
 
+   if (status  PORT_IRQ_SDB_FIS) {
+   /*
+* if this is an ATAPI device with AN turned on,
+* then we should interrogate the device to
+* determine the cause of the interrupt
+*
+* for AN - this we should check the SDB FIS
+* and find the I and N bits set
+*/
+   const __le32 *f = pp-rx_fis + RX_FIS_SDB;
+   u32 f0 = le32_to_cpu(f[0]);
+
+   /* check the 'N' bit in word 0 of the FIS */
+   if (f0  (1  15)) {
+   int port_addr = ((f0  0x0f00)  8);
+   struct ata_device *adev;
+   if (port_addr  ATA_MAX_DEVICES) {
+   adev = ap-link.device[port_addr];
+   if (adev-flags  ATA_DFLAG_AN)
+   ata_scsi_media_change_notify(adev);
+   }
+   }
+   }
+
if (ap-link.sactive)
qc_active = readl(port_mmio + PORT_SCR_ACT);
else
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 7d66c98..f0f586b 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -3160,6 +3160,24 @@ static void ata_scsi_handle_link_detach(struct ata_link 
*link)
 }
 
 /**
+ * ata_scsi_media_change_notify - send media change event
+ * @atadev: Pointer to the disk device with media change event
+ *
+ * Tell the block layer to send a media change notification
+ * event.
+ *
+ * LOCKING:
+ * interrupt context, may not sleep.
+ */
+void ata_scsi_media_change_notify(struct ata_device *atadev)
+{
+#ifdef OTHER_AN_PATCHES_HAVE_BEEN_APPLIED
+   scsi_device_event_notify(atadev-sdev, SDEV_MEDIA_CHANGE);
+#endif
+}
+EXPORT_SYMBOL_GPL(ata_scsi_media_change_notify);
+
+/**
  * ata_scsi_hotplug - SCSI part of hotplug
  * @work: Pointer to ATA port to perform SCSI hotplug on
  *
diff --git a/include/linux/libata.h b/include/linux/libata.h
index d1bd9f5..08d6a9a 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -754,6 +754,7 @@ extern void ata_host_init(struct ata_host *, struct device 
*,
 extern int ata_scsi_detect(struct scsi_host_template *sht);
 extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg);
 extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct 
scsi_cmnd *));
+extern void ata_scsi_media_change_notify(struct ata_device *atadev);
 extern void ata_sas_port_destroy(struct ata_port *);
 extern struct ata_port *ata_sas_port_alloc(struct ata_host *,
   struct ata_port_info *, struct 
Scsi_Host *);


Re: [patch 2/4] scsi: expose AN support to user space

2007-08-15 Thread Jeff Garzik

Kristen Carlson Accardi wrote:

If a scsi_device supports async notification for media change, then
let user space know this capability exists by creating a new sysfs
entry media_change_notify, which will be 1 if it is supported, and
0 if not supported.  Create a routine which allows scsi devices to
send a uevent when media change events occur.

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


if James is happy with this patch, I'm happy with patch #2 and #3


-
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/4] Store interrupt value

2007-08-15 Thread Jeff Garzik

Kristen Carlson Accardi wrote:

Use a stored value for which interrupts to enable.  Changing this allows
us to selectively turn off certain interrupts later and have them 
stay off.


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


applied, after adding ahci:  prefix to subject 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] pata_artop: fix UDMA5 for AEC6280[R] and UDMA6 for AEC6880[R]

2007-08-15 Thread Jeff Garzik

Bartlomiej Zolnierkiewicz wrote:

Maximum supported UDMA mode for AEC6280[R] is UDMA5 (not UDMA4)
and for AEC6880[R] it is UDMA6 (not UDMA5):

* Fix the problem by adding missing struct ata_port_info to artop_init_one().

* Use the right naming (s/626/628/).

* Bump driver version.

Fixes IDE-libata regression, problem was never present in IDE aec62xx driver.

Cc: Alan Cox [EMAIL PROTECTED]
Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
---
 drivers/ata/pata_artop.c |   19 ++-
 1 file changed, 14 insertions(+), 5 deletions(-)


applied to #upstream-fixes


-
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/2] pata_hpt37x: actually clock HPT374 with 50 MHz DPLL (take 2)

2007-08-15 Thread Jeff Garzik

Sergei Shtylyov wrote:

The DPLL tuning code always set up it for 66 MHz due to wrong UltraDMA mask
including mode 5 used to check for the necessity of 66 MHz clocking -- this
caused 66 MHz clock to be used for HPT374 chip that does not tolerate it.
While fixing this, also remove PLL mode from the TODO list -- I don't think
it's still a relevant item.

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

---
This is against the current Linus tree -- with wording in the header fixed. :-)

 drivers/ata/pata_hpt37x.c |   12 
 1 files changed, 4 insertions(+), 8 deletions(-)


applied 1-2 to #upstream-fixes


-
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: add TECRA M7 to broken suspend list

2007-08-15 Thread Jeff Garzik

Tejun Heo wrote:

Add TECRA M7 to broken suspend list.  Reported by Marie Koreen.

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


applied to #upstream-fixes


-
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 25/25] ata_piix: disallow UDMA 133 on ICH5 ICH7

2007-08-15 Thread Jeff Garzik

[EMAIL PROTECTED] wrote:

From: Christian Lamparter [EMAIL PROTECTED]

There is another outstanding issue with ata_piix.c.  Intel has never
officially supported anything faster than PATA 100MB/s.

But, the ata_piix.c driver define the ICH5  ICH7 as UDMA6 (aka 133MB/s)
capable.  [ Well, no one has probably noticed it before, because there is bug
in do_pata_set_dmamode...  Just look at
libata_atapiix_enable_real_udma133.patch and you'll see what wrong with it.  ]


Here are Intel's datasheets for the affected chipsets: ICH5 Datasheet:
http://www.intel.com/design/chipsets/datashts/252516.htm (See note on page
183: ...  the ICH5 supports reads at the maximum rate of 100MB/s.)

ICH7 Datasheet: http://www.intel.com/design/chipsets/datashts/307013.htm (See
first note on page 190: ...  the ICH7 supports reads at the maximum rate of
100MB/s.)

They are two different ways to deal with it:

- Either -

1. replace all ich_pata_133 with ich_pata_100. 
   (libata_atapiix_disable_udma6.diff - diff from 2.6.22 )


- Or -

2. keep all ich_pata_133 and fix the bug in do_pata_set_dmamode. 
   (libata_atapiix_enable_real_udma133.patch - diff from 2.6.22) If there are

   any concerns about the safety of the patch patch:
   http://lkml.org/lkml/2007/7/6/292 (It was already tested by an Intel
   employee, but I guess a bit more user input is necessary here...  )

This patch implements 1.

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

 drivers/ata/ata_piix.c |8 
 1 files changed, 4 insertions(+), 4 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 04/25] libata-add-irq_flags-to-struct-pata_platform_info-fix

2007-08-15 Thread Jeff Garzik

[EMAIL PROTECTED] wrote:

From: Andrew Morton [EMAIL PROTECTED]

Remove unneeded, undesirable cast of void*.

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

 drivers/ata/pata_platform.c |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


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 libata-dev#upstream 3/3] libata: implement and use ata_port_desc() to report port configuration

2007-08-15 Thread Jeff Garzik

Tejun Heo wrote:

Currently, port configuration reporting has the following problems.

* iomapped address is reported instead of raw address
* report contains irrelevant fields or lacks necessary fields for
  non-SFF controllers.
* host-irq/irq2 are there just for reporting and hacky.

This patch implements and uses ata_port_desc() and
ata_port_pbar_desc().  ata_port_desc() is almost identical to
ata_ehi_push_desc() except that it takes @ap instead of @ehi, has no
locking requirement, can only be used during host initialization and 
 is used as separator instead of , .  ata_port_pbar_desc() is a
helper to ease reporting of a PCI BAR or an offsetted address into it.

LLD pushes whatever description it wants using the above two
functions.  The accumulated description is printed on host
registration after [S/P]ATA max MAX_XFERMODE .

SFF init helpers and ata_host_activate() automatically add
descriptions for addresses and irq respectively, so only LLDs which
isn't standard SFF need to add custom descriptions.  In many cases,
such controllers need to report different things anyway.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
---
pata_hpt3x3 fixed as pointed out by Alan.

 drivers/ata/ahci.c   |4 ++
 drivers/ata/libata-core.c|   27 +++--
 drivers/ata/libata-eh.c  |   67 +++
 drivers/ata/libata-sff.c |   23 +++---
 drivers/ata/pata_cs5520.c|   23 +-
 drivers/ata/pata_hpt3x3.c|6 +++
 drivers/ata/pata_icside.c|   19 ++--
 drivers/ata/pata_isapnp.c|4 ++
 drivers/ata/pata_ixp4xx_cf.c |   13 +++-
 drivers/ata/pata_legacy.c|2 +
 drivers/ata/pata_mpc52xx.c   |7 +++-
 drivers/ata/pata_mpiix.c |   16 ++
 drivers/ata/pata_pcmcia.c|2 +
 drivers/ata/pata_pdc2027x.c  |   17 +++---
 drivers/ata/pata_platform.c  |4 ++
 drivers/ata/pata_qdi.c   |5 ++-
 drivers/ata/pata_scc.c   |3 +
 drivers/ata/pata_winbond.c   |7 +++-
 drivers/ata/pdc_adma.c   |   13 ++--
 drivers/ata/sata_inic162x.c  |   14 +++-
 drivers/ata/sata_mv.c|8 -
 drivers/ata/sata_promise.c   |   11 +--
 drivers/ata/sata_qstor.c |   11 +--
 drivers/ata/sata_sil.c   |6 +++
 drivers/ata/sata_sil24.c |7 +++-
 drivers/ata/sata_svw.c   |   12 +--
 drivers/ata/sata_sx4.c   |   19 +++-
 drivers/ata/sata_uli.c   |   13 
 drivers/ata/sata_via.c   |3 +
 drivers/ata/sata_vsc.c   |   12 +--
 include/linux/libata.h   |   12 ++-
 31 files changed, 309 insertions(+), 81 deletions(-)


ACK, request rediff once #upstream mirrors out


-
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-dev#upstream 1/3] libata: use ata_port_printk() in ata_wait_idle()

2007-08-15 Thread Jeff Garzik

Tejun Heo wrote:

ata_wait_idle() identified controller by printing out the address of
the Status register.  This is bogus because 1. it's iomapped address
2. some controllers don't have Status register and don't initialize
the field.  Use ata_port_printk() instead.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
---
Currently there's no equivalent ata_msg_* level for ATA_DEBUG, so the
printk is conditionalized with #ifdef ATA_DEBUG.  We need to kill
ATA_DEBUG, ATA_VERBOSE_DEBUG and integrate them into ata_msg_* in the
future.

 include/linux/libata.h |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)


applied 1-2 of 3


-
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-dev#upstream 2/2] libata: move EH repeat reporting into ata_eh_report()

2007-08-15 Thread Jeff Garzik

Tejun Heo wrote:

EH is sometimes repeated without any error or action.  For example,
this happens when probing IDENTIFY fails because of a phantom device.
In these cases, all the repeated EH does is making sure there is no
unhandled error or pending action and return.  This repeation is
necessary to avoid losing any event which occurred while EH was in
progress.

Unfortunately, this dry run causes annonying EH pending after
completion message.  This patch moves the repeat reporting into
ata_eh_report() such that it's more compact and skipped on dry runs.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
Cc: Mikael Pettersson [EMAIL PROTECTED]
---
Mikael, please verify this removes the annonying message you're
seeing.

Thanks.

 drivers/ata/libata-eh.c |   26 --
 include/linux/libata.h  |5 +++--
 2 files changed, 19 insertions(+), 12 deletions(-)


this will want a rediff too, but looks OK to me


-
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-08-15 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/ata_piix.c |9 -
 drivers/ata/libata-core.c  |2 +-
 drivers/ata/pata_artop.c   |   19 ++-
 drivers/ata/pata_hpt37x.c  |   20 +---
 drivers/ata/pata_hpt3x2n.c |8 +---
 drivers/ata/pata_isapnp.c  |2 ++
 drivers/ata/sata_mv.c  |3 +++
 7 files changed, 42 insertions(+), 21 deletions(-)

Alan Cox (1):
  sata_mv: PCI IDs for Hightpoint RocketRaid 1740/1742

Bartlomiej Zolnierkiewicz (1):
  pata_artop: fix UDMA5 for AEC6280[R] and UDMA6 for AEC6880[R]

Jeff Garzik (1):
  [libata] pata_isapnp: replace missing module device table

Ryan Power (1):
  libata: adjust libata to ignore errors after spinup

Sergei Shtylyov (2):
  pata_hpt37x: actually clock HPT374 with 50 MHz DPLL (take 2)
  pata_hpt{37x|3x2n}: fix clock reporting (take 2)

Tejun Heo (2):
  ata_piix: update map 10b for ich8m
  ata_piix: add TECRA M7 to broken suspend list

diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index a78832e..071d274 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -436,7 +436,7 @@ static const struct piix_map_db ich8_map_db = {
/* PM   PS   SM   SS   MAP */
{  P0,  P2,  P1,  P3 }, /* 00b (hardwired when in AHCI) */
{  RV,  RV,  RV,  RV },
-   {  IDE,  IDE,  NA,  NA }, /* 10b (IDE mode) */
+   {  P0,  P2, IDE, IDE }, /* 10b (IDE mode) */
{  RV,  RV,  RV,  RV },
},
 };
@@ -901,6 +901,13 @@ static int piix_broken_suspend(void)
},
},
{
+   .ident = TECRA M7,
+   .matches = {
+   DMI_MATCH(DMI_SYS_VENDOR, TOSHIBA),
+   DMI_MATCH(DMI_PRODUCT_NAME, TECRA M7),
+   },
+   },
+   {
.ident = Satellite U205,
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, TOSHIBA),
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 60e78be..99d4fbf 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -1723,7 +1723,7 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int 
*p_class,
tf.protocol = ATA_PROT_NODATA;
tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
err_mask = ata_exec_internal(dev, tf, NULL, DMA_NONE, NULL, 0);
-   if (err_mask) {
+   if (err_mask  id[2] != 0x738c) {
rc = -EIO;
reason = SPINUP failed;
goto err_out;
diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c
index ce589d9..b5352eb 100644
--- a/drivers/ata/pata_artop.c
+++ b/drivers/ata/pata_artop.c
@@ -2,6 +2,7 @@
  *pata_artop.c - ARTOP ATA controller driver
  *
  * (C) 2006 Red Hat [EMAIL PROTECTED]
+ * (C) 2007 Bartlomiej Zolnierkiewicz
  *
  *Based in part on drivers/ide/pci/aec62xx.c
  * Copyright (C) 1999-2002 Andre Hedrick [EMAIL PROTECTED]
@@ -28,7 +29,7 @@
 #include linux/ata.h
 
 #define DRV_NAME   pata_artop
-#define DRV_VERSION0.4.3
+#define DRV_VERSION0.4.4
 
 /*
  * The ARTOP has 33 Mhz and over clocked timing tables. Until we
@@ -430,7 +431,7 @@ static int artop_init_one (struct pci_dev *pdev, const 
struct pci_device_id *id)
.udma_mask  = ATA_UDMA4,
.port_ops   = artop6260_ops,
};
-   static const struct ata_port_info info_626x_fast = {
+   static const struct ata_port_info info_628x = {
.sht= artop_sht,
.flags  = ATA_FLAG_SLAVE_POSS,
.pio_mask   = 0x1f, /* pio0-4 */
@@ -438,6 +439,14 @@ static int artop_init_one (struct pci_dev *pdev, const 
struct pci_device_id *id)
.udma_mask  = ATA_UDMA5,
.port_ops   = artop6260_ops,
};
+   static const struct ata_port_info info_628x_fast = {
+   .sht= artop_sht,
+   .flags  = ATA_FLAG_SLAVE_POSS,
+   .pio_mask   = 0x1f, /* pio0-4 */
+   .mwdma_mask = 0x07, /* mwdma0-2 */
+   .udma_mask  = ATA_UDMA6,
+   .port_ops   = artop6260_ops,
+   };
const struct ata_port_info *ppi[] = { NULL, NULL };
 
if (!printed_version++)
@@ -455,13 +464,13 @@ static int artop_init_one (struct pci_dev *pdev, const 
struct pci_device_id *id)
}
else if (id-driver_data == 1)  /* 6260 */
ppi[0] = info_626x;
-   else if (id-driver_data == 2)  { /* 6260 or 6260 + fast */
+   else if (id-driver_data == 2)  { /* 6280

Re: [PATCH 3/4] libata: ACPI checks for 80wire cable

2007-08-16 Thread Jeff Garzik

Alan Cox wrote:

We can make use of this on the pata_amd driver as many Nvidia devices
don't have reliable cable detect.

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


applied 3-4


-
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 take #5] [libata] libata driver for bf548 on chip ATAPI controller.

2007-08-16 Thread Jeff Garzik

Sonic Zhang wrote:

Update:
1. Condition branch code instead of while loop from Alan Cox.
2. Condtinue in PIO mode after failing to request DMA.

Signed-off-by: Sonic Zhang [EMAIL PROTECTED]
---
 drivers/ata/Kconfig  |   28 +
 drivers/ata/Makefile |1
 drivers/ata/pata_bf54x.c | 1581 
+++
 3 files changed, 1610 insertions(+)

diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index b4a8d60..e679f04 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -583,4 +583,32 @@ config PATA_SCC
 
 	  If unsure, say N.
 
+config PATA_BF54X

+   tristate Blackfin 54x ATAPI support
+   depends on BF542 || BF548 || BF549
+   help
+ This option enables support for the built-in ATAPI controller on
+ Blackfin 54x family chips.
+
+ If unsure, say N.
+
+choice
+   prompt Blackfin 54x ATAPI mode
+   depends on PATA_BF54X
+   default PATA_BF54X_DMA
+   help
+ This option selects bf54x ATAPI controller working mode.
+
+config PATA_BF54X_PIO
+   bool PIO mode
+   help
+ Blackfin ATAPI controller works under PIO mode.
+
+config PATA_BF54X_DMA
+   bool DMA mode
+   help
+ Blackfin ATAPI controller works under DMA mode.



Given update #2 at the top of your message, I would think a more natural 
Kconfig setup would now be a simple DMA support? yes/no setting.  PIO 
would theoretically always be present as a fallback, I would think.




diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
index 8149c68..c2ecba5 100644
--- a/drivers/ata/Makefile
+++ b/drivers/ata/Makefile
@@ -61,6 +61,7 @@ obj-$(CONFIG_PATA_SIS)+= pata_sis.o
 obj-$(CONFIG_PATA_TRIFLEX) += pata_triflex.o
 obj-$(CONFIG_PATA_IXP4XX_CF)   += pata_ixp4xx_cf.o
 obj-$(CONFIG_PATA_SCC) += pata_scc.o
+obj-$(CONFIG_PATA_BF54X)   += pata_bf54x.o
 obj-$(CONFIG_PATA_PLATFORM)+= pata_platform.o
 obj-$(CONFIG_PATA_ICSIDE)  += pata_icside.o
 # Should be last but one libata driver
diff --git a/drivers/ata/pata_bf54x.c b/drivers/ata/pata_bf54x.c
new file mode 100644
index 000..d0f52b0
--- /dev/null
+++ b/drivers/ata/pata_bf54x.c
@@ -0,0 +1,1581 @@
+/*
+ * File: drivers/ata/pata_bf54x.c
+ * Author:   Sonic Zhang [EMAIL PROTECTED]
+ *
+ * Created:
+ * Description:  ATAPI Driver for blackfin 54x


Terminology:  When used alone, ATAPI normally refers to CD/DVD-ROM 
style devices.  A better description would be PATA driver for ...




+#define DRV_NAME   bf54x-atapi
+#define DRV_VERSION0.6


DRV_NAME should be pata_bf54x



+#define ATA_REG_CTRL   0x0E
+#define ATA_REG_ALTSTATUS  ATA_REG_CTRL


a simple comment at the beginning of this list, noting that these are 
the controller's registers, would be nice




+#define ATAPI_OFFSET_CONTROL   0x00
+#define ATAPI_OFFSET_STATUS0x04
+#define ATAPI_OFFSET_DEV_ADDR  0x08
+#define ATAPI_OFFSET_DEV_TXBUF 0x0c
+#define ATAPI_OFFSET_DEV_RXBUF 0x10
+#define ATAPI_OFFSET_INT_MASK  0x14
+#define ATAPI_OFFSET_INT_STATUS0x18
+#define ATAPI_OFFSET_XFER_LEN  0x1c
+#define ATAPI_OFFSET_LINE_STATUS   0x20
+#define ATAPI_OFFSET_SM_STATE  0x24
+#define ATAPI_OFFSET_TERMINATE 0x28
+#define ATAPI_OFFSET_PIO_TFRCNT0x2c
+#define ATAPI_OFFSET_DMA_TFRCNT0x30
+#define ATAPI_OFFSET_UMAIN_TFRCNT  0x34
+#define ATAPI_OFFSET_UDMAOUT_TFRCNT0x38
+#define ATAPI_OFFSET_REG_TIM_0 0x40
+#define ATAPI_OFFSET_PIO_TIM_0 0x44
+#define ATAPI_OFFSET_PIO_TIM_1 0x48
+#define ATAPI_OFFSET_MULTI_TIM_0   0x50
+#define ATAPI_OFFSET_MULTI_TIM_1   0x54
+#define ATAPI_OFFSET_MULTI_TIM_2   0x58
+#define ATAPI_OFFSET_ULTRA_TIM_0   0x60
+#define ATAPI_OFFSET_ULTRA_TIM_1   0x64
+#define ATAPI_OFFSET_ULTRA_TIM_2   0x68
+#define ATAPI_OFFSET_ULTRA_TIM_3   0x6c
+
+
+/**
+ * PIO Mode - Frequency compatibility
+ */
+/* mode: 0 1 2 3 4 */
+static u32 pio_fsclk[] =
+{ , , , ,  };
+
+/**
+ * MDMA Mode - Frequency compatibility
+ */
+/*   mode:  0 1 2*/
+static u32 mdma_fsclk[] = { , ,  };
+
+/**
+ * UDMA Mode - Frequency compatibility
+ *
+ * UDMA5 - 100 MB/s   - SCLK  = 133 MHz
+ * UDMA4 - 66 MB/s- SCLK =  80 MHz
+ * UDMA3 - 44.4 MB/s  - SCLK =  50 MHz
+ * UDMA2 - 33 MB/s- SCLK =  40 MHz
+ */
+/* mode: 0 1 2 3 4  5 */
+static u32 udma_fsclk[] =
+{ , , 4000, 5000, 8000, 1 };
+
+/**
+ * Register transfer timing table
+ */
+/*   mode:   01234*/
+/* Cycle Time */
+static u32 reg_t0min[]   = { 600, 383, 330, 180, 120 };
+/* DIOR/DIOW to end cycle */
+static u32 reg_t2min[]   = { 

Re: [PATCHSET #upstream-fixes] libata: update HPA handling

2007-08-16 Thread Jeff Garzik

Tejun Heo wrote:

Hello,

The current HPA handling implementation isn't robust enough and causes
regressions on several cases.  This patchset contains HPA handling
update.

* blacklist devices which puke on READ_NATIVE_MAX
* proper/better error handling - in most cases, HPA failure won't
  result in detection failure
* re-read IDENTIFY data after resizing
* more concise messages

Tested by setting up HPA area manually.


This is a bit big for 2.6.23-rc though :/


-
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 take #5] [libata] libata driver for bf548 on chip ATAPI controller.

2007-08-16 Thread Jeff Garzik

Mike Frysinger wrote:

On 8/16/07, Jeff Garzik [EMAIL PROTECTED] wrote:

Sonic Zhang wrote:

+static void bfin_set_piomode(struct ata_port *ap, struct ata_device *adev)
+{
+ int mode = adev-pio_mode - XFER_PIO_0;
+ unsigned long base = (unsigned long)ap-ioaddr.ctl_addr;


(added Bryan Wu to CC)

Someone needs to need fix the bfin architecture:  the addresses on the
bfin_read/bfin_write functions should be 'void __iomem *' not unsigned long.


there are no address pointers anymore, so there is nothing to cast ...
the bfin_read/bfin_write macros are done in sexy asm:
#define bfin_write8(addr,val) __asm__ __volatile__(b[%0] = %1; ::
a(addr), d(val))
or i'm misunderstanding what you mean ...

where do you see (unsigned long) ?


Look up (into the message you quoted).

Regardless of the implementation, the C type system should be employed 
to ensure that 'addr' is known to the compiler as 'void __iomem *' 
rather than unsigned long.


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 take #5] [libata] libata driver for bf548 on chip ATAPI controller.

2007-08-16 Thread Jeff Garzik

Mike Frysinger wrote:

On 8/16/07, Jeff Garzik [EMAIL PROTECTED] wrote:

Mike Frysinger wrote:

On 8/16/07, Jeff Garzik [EMAIL PROTECTED] wrote:

Sonic Zhang wrote:

+static void bfin_set_piomode(struct ata_port *ap, struct ata_device *adev)
+{
+ int mode = adev-pio_mode - XFER_PIO_0;
+ unsigned long base = (unsigned long)ap-ioaddr.ctl_addr;

(added Bryan Wu to CC)

Someone needs to need fix the bfin architecture:  the addresses on the
bfin_read/bfin_write functions should be 'void __iomem *' not unsigned long.

there are no address pointers anymore, so there is nothing to cast ...
the bfin_read/bfin_write macros are done in sexy asm:
#define bfin_write8(addr,val) __asm__ __volatile__(b[%0] = %1; ::
a(addr), d(val))
or i'm misunderstanding what you mean ...

where do you see (unsigned long) ?

Look up (into the message you quoted).


yes, you quoted the driver, not the Blackfin core parts


Regardless of the implementation, the C type system should be employed
to ensure that 'addr' is known to the compiler as 'void __iomem *'
rather than unsigned long.


i agree the specific pata driver should be declared the way you
described, however i dont see how that has bearing on the
bfin_read/bfin_write macros as you seemed to indicate


Macros completely ignore the C type system.  Look at other architectures 
if you cannot figure out how to implement a static inline with stronger 
typing.


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] libata-core: support wildcard matching in ata_blacklist_entry

2007-08-16 Thread Jeff Garzik

Alan Cox wrote:

On Wed, 8 Aug 2007 15:20:57 -0500
David Milburn [EMAIL PROTECTED] wrote:


Support the use of '*' in model_num and model_rev entries
in ata_device_blacklist[].

CC: [EMAIL PROTECTED]
Signed-off-by: David Milburn [EMAIL PROTECTED]


Suggestion: Pull the match function out of line so you don't have two
copies of it and can remove all the wacky ? operators

something like this ? (untested)

strpatterncmp(const char *name, const char *patt)
{
const char *p = strchr(patt, '*');
if (p == NULL)
p = patt + strlen(patt);
return strncmp(name, patt, p-patt);
}


Seems quite sane to me...

And I support the addition of wildcard operators; that should make 
maintenance a bit easier.



-
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-08-16 Thread Jeff Garzik

Mikael Pettersson wrote:

(cc:ing linuxppc-dev)

On Tue, 26 Jun 2007 13:43:15 +0800, 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.


Unfortunately this breaks pata_pdc2027x on my PowerMac G3:


Did this ever get resolved?

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] libata: kill sector_buf temporary buffer

2007-08-16 Thread Jeff Garzik

*Thats* why I left the patch aside and didn't commit it...  :)

Thanks for the reminder,

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.23-rc3] pata_pdc2027x: PLL detection fixes

2007-08-18 Thread Jeff Garzik

Mikael Pettersson wrote:

Previously I reported that the pata_pdc2027x PLL detection changes
in kernel 2.6.22 broke the driver on my PowerMac:


pata_pdc2027x: Invalid PLL input clock 1691742kHz, give up!


This is followed by a number of errors and speed reduction
steps on the affected ports.

There are two bugs in pata_pdc2027x's PLL detection code:

1. The PLL counter's start value is read before the chip is
   put in test mode. Outside of test mode the counter is
   halted, and on the PowerMac the counter is zero because
   the chip hasn't been initialised by its BIOS.

   The fix is to move the read of the start value to after
   test mode is started, but before the mdelay() in test mode.
   This also improves the precision of the PLL detection.

2. The code to compute the number of PLL decrements during the
   mdelay() in test mode fails to consider that the PLL counter
   only is 30 bits wide. If there is a wraparound, it will compute
   an incorrect and much too large value. On the PowerMac, the
   start count is zero, the end count is a large 30-bit value, so
   wraparound occurs and an out of bounds PLL clock is detected.

   The fix is to mask the (start - end) computation to 30 bits.

While debugging this I also noticed that pdc_read_counter()
reads the two halves of the 30-bit PLL counter as 16-bit values,
and then combines them as if the halves only are 15 bits wide.
To avoid confusion, the halves should be read as 15-bit values.

This patch implements all three changes. It fixes the PLL detection
failure on my PowerMac, and doesn't cause any regressions on an x86
with an identical card.

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


Fantastic!  Thanks for putting in a great effort to track these down.

I'll queue it up [unless someone responds with a problem requiring 
revision, of course]




diff -rupN linux-2.6.23-rc3/drivers/ata/pata_pdc2027x.c 
linux-2.6.23-rc3.pata_pdc2027x-pll-detection-fixes/drivers/ata/pata_pdc2027x.c
--- linux-2.6.23-rc3/drivers/ata/pata_pdc2027x.c2007-07-09 
22:01:31.0 +0200
+++ 
linux-2.6.23-rc3.pata_pdc2027x-pll-detection-fixes/drivers/ata/pata_pdc2027x.c  
2007-08-18 21:53:40.0 +0200
@@ -563,13 +563,13 @@ static long pdc_read_counter(struct ata_
u32 bccrl, bccrh, bccrlv, bccrhv;
 
 retry:

-   bccrl = readl(mmio_base + PDC_BYTE_COUNT)  0x;
-   bccrh = readl(mmio_base + PDC_BYTE_COUNT + 0x100)  0x;
+   bccrl = readl(mmio_base + PDC_BYTE_COUNT)  0x7fff;
+   bccrh = readl(mmio_base + PDC_BYTE_COUNT + 0x100)  0x7fff;
rmb();
 
 	/* Read the counter values again for verification */

-   bccrlv = readl(mmio_base + PDC_BYTE_COUNT)  0x;
-   bccrhv = readl(mmio_base + PDC_BYTE_COUNT + 0x100)  0x;
+   bccrlv = readl(mmio_base + PDC_BYTE_COUNT)  0x7fff;
+   bccrhv = readl(mmio_base + PDC_BYTE_COUNT + 0x100)  0x7fff;
rmb();
 
 	counter = (bccrh  15) | bccrl;


Unrelated to your changes, but, I wonder why those rmb() are there at 
all...?


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.23-rc3] pata_pdc2027x: PLL detection fixes

2007-08-18 Thread Jeff Garzik

Albert Lee wrote:

The first rmb() is to make sure bccrl is read before bccrlv for later
(bccrl = bccrlv) check since both reading the same memory address.


That's already guaranteed without the rmb(), AFAICS.

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.23-rc3] pata_pdc2027x: PLL detection fixes

2007-08-19 Thread Jeff Garzik

Sergei Shtylyov wrote:
   What have really surpried me about Promise was that they gave their 
SATA chip docs to Jeff who made them public and yet they continue to 
conceal the old PATA chip docs... :-/



They probably just need to be poked.  I've been sitting on the sata_sx4 
docs and cards, waiting on them to give me permission to post the SX4 
docs since January.  Previous doc pokings were successful, but sometimes 
they disappear for months at a time.


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: no need to add new DID's to AHCI driver?

2007-08-22 Thread Jeff Garzik

Gaston, Jason D wrote:

Hello,

Now that the AHCI driver has support for all controllers with the 0x0106
(AHCI) class code, I am not planning on adding controller DeviceID's for
AHCI controllers.  I want to verify that this is the correct course of
action.

Note:  I still will have to add the Intel SW RAID controller
DeviceID's as they have a 0x0104 (RAID) class code.


Yep, that's fine -- and the encouraged direction.

The ideal situation for users is when new hardware is automagically 
supported, without needing any driver PCI ID modifications at all.


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 #upstream-fixes] libata: fix n_sectors failure handling during revalidation

2007-08-23 Thread Jeff Garzik

Tejun Heo wrote:

If revalidation fails because device has different n_sectors after
configuration the original n_sectors should be restored before failing
revalidation.  Without this fix, n_sectors difference will incorrectly
and silently pass revalidation when revalidation is retried.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
---
 drivers/ata/libata-core.c |4 
 1 file changed, 4 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] pata_marvell: Add another PCI identifier

2007-08-23 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.23rc3-mm1/drivers/ata/pata_marvell.c 
linux-2.6.23rc3-mm1/drivers/ata/pata_marvell.c
--- linux.vanilla-2.6.23rc3-mm1/drivers/ata/pata_marvell.c  2007-08-22 
17:23:00.0 +0100
+++ linux-2.6.23rc3-mm1/drivers/ata/pata_marvell.c  2007-08-22 
17:46:28.0 +0100
@@ -190,7 +190,8 @@
 
 static const struct pci_device_id marvell_pci_tbl[] = {

{ PCI_DEVICE(0x11AB, 0x6101), },
-   { PCI_DEVICE(0x11AB, 0x6145), },
+   { PCI_DEVICE(0x11AB, 0x6121), },
+   { PCI_DEVICE(0x11AB, 0x6123), },
{ } /* terminate list */


same question as with other poster:  where does 0x6145 go, and why?

Is this for -mm only?


-
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_sis: Add the FSC Amilo and friends

2007-08-23 Thread Jeff Garzik

Alan Cox wrote:

More short cables

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


diff -u --new-file --recursive --exclude-from /usr/src/exclude 
linux.vanilla-2.6.23rc3-mm1/drivers/ata/pata_sis.c 
linux-2.6.23rc3-mm1/drivers/ata/pata_sis.c
--- linux.vanilla-2.6.23rc3-mm1/drivers/ata/pata_sis.c  2007-08-22 
17:23:00.0 +0100
+++ linux-2.6.23rc3-mm1/drivers/ata/pata_sis.c  2007-08-22 17:46:53.0 
+0100
@@ -54,6 +54,7 @@
 static const struct sis_laptop sis_laptop[] = {
/* devid, subvendor, subdev */
{ 0x5513, 0x1043, 0x1107 }, /* ASUS A6K */
+   { 0x5513, 0x1734, 0x105F }, /* FSC Amilo A1630 */
/* end marker */
{ 0, }


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_via: Add Armia W730-K8 and other rebadgings

2007-08-23 Thread Jeff Garzik

Alan Cox wrote:

More cable funnies

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

diff -u --new-file --recursive --exclude-from /usr/src/exclude 
linux.vanilla-2.6.23rc3-mm1/drivers/ata/pata_via.c 
linux-2.6.23rc3-mm1/drivers/ata/pata_via.c
--- linux.vanilla-2.6.23rc3-mm1/drivers/ata/pata_via.c  2007-08-22 
17:23:00.0 +0100
+++ linux-2.6.23rc3-mm1/drivers/ata/pata_via.c  2007-08-22 17:46:53.0 
+0100
@@ -63,7 +63,7 @@
 #include linux/dmi.h
 
 #define DRV_NAME pata_via

-#define DRV_VERSION 0.3.1
+#define DRV_VERSION 0.3.2
 
 /*

  * The following comes directly from Vojtech Pavlik's ide/pci/via82cxxx
@@ -144,6 +144,9 @@
/* Systems by DMI */
if (dmi_check_system(cable_dmi_table))
return 1;
+   /* Armia W730-K8/Targa Visionary 811/... */
+   if (pdev-subsystem_vendor == 0x161F  pdev-subsystem_device == 
0x2032)
+   return 1;
return 0;


applied with s/Armia/Arima/ as Mikael suggested


-
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 #upstream-fixes] libata: don't check n_sectors during revalidation if zero

2007-08-23 Thread Jeff Garzik

Tejun Heo wrote:

If the initial configuration fails early, n_sectors is left at zero.
Checking against it during revalidation makes retried configuration
fail due to n_sectors mismatch.  Ignore zero n_sectors during
revalidation.

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


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


[git patches] libata fixes

2007-08-23 Thread Jeff Garzik

Fixes + more laptop IDs

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/libata-core.c   |7 ++-
 drivers/ata/pata_pdc2027x.c |   18 +-
 drivers/ata/pata_sis.c  |1 +
 drivers/ata/pata_via.c  |5 -
 4 files changed, 20 insertions(+), 11 deletions(-)

Alan Cox (2):
  pata_sis: Add the FSC Amilo and friends
  pata_via: Add Arima W730-K8 and other rebadgings

Mikael Pettersson (1):
  pata_pdc2027x: PLL detection fixes

Tejun Heo (2):
  libata: fix n_sectors failure handling during revalidation
  libata: don't check n_sectors during revalidation if zero

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 99d4fbf..2ad4dda 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3700,11 +3700,16 @@ int ata_dev_revalidate(struct ata_device *dev, unsigned 
int readid_flags)
goto fail;
 
/* verify n_sectors hasn't changed */
-   if (dev-class == ATA_DEV_ATA  dev-n_sectors != n_sectors) {
+   if (dev-class == ATA_DEV_ATA  n_sectors 
+   dev-n_sectors != n_sectors) {
ata_dev_printk(dev, KERN_INFO, n_sectors mismatch 
   %llu != %llu\n,
   (unsigned long long)n_sectors,
   (unsigned long long)dev-n_sectors);
+
+   /* restore original n_sectors */
+   dev-n_sectors = n_sectors;
+
rc = -ENODEV;
goto fail;
}
diff --git a/drivers/ata/pata_pdc2027x.c b/drivers/ata/pata_pdc2027x.c
index 69a5aa4..e3245b3 100644
--- a/drivers/ata/pata_pdc2027x.c
+++ b/drivers/ata/pata_pdc2027x.c
@@ -563,13 +563,13 @@ static long pdc_read_counter(struct ata_host *host)
u32 bccrl, bccrh, bccrlv, bccrhv;
 
 retry:
-   bccrl = readl(mmio_base + PDC_BYTE_COUNT)  0x;
-   bccrh = readl(mmio_base + PDC_BYTE_COUNT + 0x100)  0x;
+   bccrl = readl(mmio_base + PDC_BYTE_COUNT)  0x7fff;
+   bccrh = readl(mmio_base + PDC_BYTE_COUNT + 0x100)  0x7fff;
rmb();
 
/* Read the counter values again for verification */
-   bccrlv = readl(mmio_base + PDC_BYTE_COUNT)  0x;
-   bccrhv = readl(mmio_base + PDC_BYTE_COUNT + 0x100)  0x;
+   bccrlv = readl(mmio_base + PDC_BYTE_COUNT)  0x7fff;
+   bccrhv = readl(mmio_base + PDC_BYTE_COUNT + 0x100)  0x7fff;
rmb();
 
counter = (bccrh  15) | bccrl;
@@ -692,16 +692,16 @@ static long pdc_detect_pll_input_clock(struct ata_host 
*host)
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);
PDPRINTK(scr[%X]\n, scr);
writel(scr | (0x01  14), mmio_base + PDC_SYS_CTL);
readl(mmio_base + PDC_SYS_CTL); /* flush */
 
+   /* Read current counter value */
+   start_count = pdc_read_counter(host);
+   do_gettimeofday(start_time);
+
/* Let the counter run for 100 ms. */
mdelay(100);
 
@@ -719,7 +719,7 @@ static long pdc_detect_pll_input_clock(struct ata_host 
*host)
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 *
+   pll_clock = ((start_count - end_count)  0x3fff) / 100 *
(1 / usec_elapsed);
 
PDPRINTK(start[%ld] end[%ld] \n, start_count, end_count);
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c
index 66bd0e8..2bd7645 100644
--- a/drivers/ata/pata_sis.c
+++ b/drivers/ata/pata_sis.c
@@ -54,6 +54,7 @@ struct sis_laptop {
 static const struct sis_laptop sis_laptop[] = {
/* devid, subvendor, subdev */
{ 0x5513, 0x1043, 0x1107 }, /* ASUS A6K */
+   { 0x5513, 0x1734, 0x105F }, /* FSC Amilo A1630 */
/* end marker */
{ 0, }
 };
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
index f645fe2..ea18e33 100644
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -63,7 +63,7 @@
 #include linux/dmi.h
 
 #define DRV_NAME pata_via
-#define DRV_VERSION 0.3.1
+#define DRV_VERSION 0.3.2
 
 /*
  * The following comes directly from Vojtech Pavlik's ide/pci/via82cxxx
@@ -144,6 +144,9 @@ static int via_cable_override(struct pci_dev *pdev)
/* Systems by DMI */
if (dmi_check_system(cable_dmi_table))
return 1;
+   /* Arima W730-K8/Targa Visionary 811/... */
+   if (pdev-subsystem_vendor == 0x161F  pdev-subsystem_device == 
0x2032)
+   return 1;
return 0;
 }
 
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to 

Re: Should sata_mv work with Highpoint RocketRAID 2300?

2007-08-24 Thread Jeff Garzik

Karim 'Kasi Mir' Senoucci wrote:

Alan Cox schrieb:

in the sata_mv source. Should I add something like:

{ PCI_VDEVICE(TTI, 0x2300), chip_604x },

Yes

Just to not leave this thread hanging in the mail archives: this didn't 
work for me. With the above patch, the controller is detected, but the 
system hangs upon inclusion of the sata_mv driver. dmess shows:


[   32.24] sata_mv :06:00.0: version 0.81
[   32.272000] ACPI: PCI Interrupt :06:00.0[A] - Done.Link [APC6] 
-GSI 16 (level, low) - IRQ 17

[   32.336000] sata_mv :06:00.0: Applying B2 workarounds to unknown rev
[   32.388000] sata_mv :06:00.0: 32 slots 4 ports SCSI mode IRQ via 
INTx

[   32.432000] sata_mv: PCI ERROR; PCI IRQ cause=0x
[   32.464000] sata_mv: PCI ERROR; PCI IRQ cause=0x
[   32.496000] sata_mv: PCI ERROR; PCI IRQ cause=0x
[   32.528000] sata_mv: PCI ERROR; PCI IRQ cause=0x
[   32.56] sata_mv: PCI ERROR; PCI IRQ cause=0x
[   32.592000] sata_mv: PCI ERROR; PCI IRQ cause=0x

and many many more PCI ERRORS until I reboot the system. So, I guess 
that particular Highpoint controller does not work yet with sata_mv.


Thanks very much for your efforts, anyway.


You need to use the sata_mv from kernel 2.6.23-rcX.

Patching into older drivers isn't guaranteed to work.

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: readXs on pci*iomap-ped regions [Was: [PATCH] /drivers/char sx.c ioremap - pci_ioremap api]

2007-08-25 Thread Jeff Garzik
If the driver knows its MMIO, using readX/writeX after pci_iomap() is 
just fine, for all current implementations, and it makes sense that way.


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: [PATCHSET #upstream-fixes] libata: update HPA handling

2007-08-28 Thread Jeff Garzik

Tejun Heo wrote:

Tejun Heo wrote:

Jeff Garzik wrote:

Tejun Heo wrote:

Hello,

The current HPA handling implementation isn't robust enough and causes
regressions on several cases.  This patchset contains HPA handling
update.

* blacklist devices which puke on READ_NATIVE_MAX
* proper/better error handling - in most cases, HPA failure won't
  result in detection failure
* re-read IDENTIFY data after resizing
* more concise messages

Tested by setting up HPA area manually.

This is a bit big for 2.6.23-rc though :/

Agreed.  We can probably just get away with ATA_HORKAGE_BROKEN_HPA patch
for 2.6.23-rc but if we hit a device which is broken but isn't listed,
libata will fail to detect the device, which is a pretty serious regression.



PING.  Do you want me to separate out the blacklist patch for
#upstream-fixes and commit HPA error handling reimplementation only into
#upstream?


Works for me.

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: ATAPI tape drives broken with libata

2007-08-29 Thread Jeff Garzik

Chuck Ebbert wrote:

https://bugzilla.redhat.com/show_bug.cgi?id=243568

Using kernel 2.6.22:

Aug 29 17:08:11 itox kernel: ata2.00: ATAPI: Seagate STT8000A, 5.51, max MWDMA2
Aug 29 17:08:11 itox kernel: ata2.00: configured for MWDMA2
Aug 29 17:08:11 itox kernel: scsi 1:0:0:0: Sequential-Access Seagate  STT8000A  
   5.51 PQ: 0 ANSI: 2
Aug 29 17:08:12 itox kernel: scsi 1:0:0:0: Attached scsi generic sg1 type 1
Aug 29 17:08:12 itox kernel: st: Version 20070203, fixed bufsize 32768, s/g 
segs 256
Aug 29 17:08:12 itox kernel: st 1:0:0:0: Attached scsi tape st0
Aug 29 17:08:12 itox kernel: st 1:0:0:0: st0: try direct i/o: yes (alignment 
512 B)
Aug 29 17:08:12 itox kernel: ata2: DRQ=1 with device error, dev_stat 0x59
Aug 29 17:08:12 itox kernel: ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 
action 0x2 frozen
Aug 29 17:08:12 itox kernel: ata2.00: cmd a0/00:00:00:00:20/00:00:00:00:00/a0 tag 0 cdb 0x0 data 0 
Aug 29 17:08:12 itox kernel:  res 51/60:03:00:00:20/00:00:00:00:00/a0 Emask 0x3 (HSM violation)


DRQ=1 is quite unusual, and would definitely trigger the problems 
further down (that I snipped)...


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: Port Multiplier Patch 2.6.22.1 on Alpha

2007-08-29 Thread Jeff Garzik

Tom Evans wrote:

Have you heard of such and issue with the 3124-2/4276 combination?
Is anyone else trying this driver on an Alpha?


Alpha should not be operationally much different from other little 
endian 64-bit platforms.


The PCI swizzle might be weird (what is your Alpha platform?), is the 
only Alpha-specific thing that comes to mind.



I have similar such behavior before when using drivers that generate 
many unaligned accesses - I only have seen 2 places they occur in 
sata_sil24 and have fixed them myself, but that made no difference.


We definitely want to fix all these you find.  Please post more info...

Also, if you are highly motivated, I would love to see if other SATA 
cards have similar problems on Alpha...


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] libata-core: Allow translation setting to fail

2007-08-31 Thread Jeff Garzik

Alan Cox wrote:

On some early drives (pre ATA1) this feature is not supported. If it
fails then we know the drive geometry is the hardware geometry and the
one we tried to set anyway so just carry on.

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

diff -u --new-file --recursive --exclude-from /usr/src/exclude 
linux.vanilla-2.6.23rc1-mm1/drivers/ata/libata-core.c 
linux-2.6.23rc1-mm1/drivers/ata/libata-core.c
--- linux.vanilla-2.6.23rc1-mm1/drivers/ata/libata-core.c   2007-07-26 
15:02:57.0 +0100
+++ linux-2.6.23rc1-mm1/drivers/ata/libata-core.c   2007-08-08 
13:38:39.257549616 +0100
@@ -4081,6 +4170,11 @@
tf.device |= (heads - 1)  0x0f; /* max head = num. of heads - 1 */
 
 	err_mask = ata_exec_internal(dev, tf, NULL, DMA_NONE, NULL, 0);

+   /* A clean abort indicates an original or just out of spec drive
+  and we should continue as we issue the setup based on the
+  drive reported working geometry */
+   if (err_mask == AC_ERR_DEV  (tf.feature  ATA_ABORTED))
+   err_mask = ~AC_ERR_DEV;


applied, after changing the above quoted line to 'err_mask = 0'.


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


Re: [PATCH 2.6.23-rc4][reRESEND] ata_piix: IDE mode SATA patch for Intel Tolapai

2007-08-31 Thread Jeff Garzik
In the future, consider following the information convention we have for 
patch revisions:


[PATCH 2.6.23-rc4] ata_piix: do some stuff
[PATCH 2.6.23-rc4 v2] ata_piix: do some stuff
[PATCH 2.6.23-rc4 v3] ata_piix: do some stuff
[PATCH 2.6.23-rc4 v4] ata_piix: do some stuff
etc.

Regards,

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.23-rc4][reRESEND] ahci: RAID mode SATA patch for Intel Tolapai

2007-08-31 Thread Jeff Garzik

Jason Gaston wrote:

Resend trying to remove 8-bit characters in the email.

This patch adds the Intel Tolapai RAID controller DID's for SATA support.

Signed-off-by:  Jason Gaston [EMAIL PROTECTED]

--- linux-2.6.23-rc4/drivers/ata/ahci.c.orig2007-08-27 18:32:35.0 
-0700
+++ linux-2.6.23-rc4/drivers/ata/ahci.c 2007-08-28 16:58:11.0 -0700
@@ -411,6 +411,8 @@
{ PCI_VDEVICE(INTEL, 0x292f), board_ahci_pi }, /* ICH9M */
{ PCI_VDEVICE(INTEL, 0x294d), board_ahci_pi }, /* ICH9 */
{ PCI_VDEVICE(INTEL, 0x294e), board_ahci_pi }, /* ICH9M */
+   { PCI_VDEVICE(INTEL, 0x502a), board_ahci }, /* Tolapai */
+   { PCI_VDEVICE(INTEL, 0x502b), board_ahci }, /* Tolapai */


Why did you not use board_ahci_pi?  Is the AHCI ports-implemented 
register unreliable on this platform?



-
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.23-rc4][reRESEND] ata_piix: IDE mode SATA patch for Intel Tolapai

2007-08-31 Thread Jeff Garzik

Jason Gaston wrote:

Resend trying to remove 8-bit characters in the email.

This patch adds the Intel Tolapai IDE mode SATA controller DID's.

Signed-off-by:  Jason Gaston [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_marvell: Add more identifiers

2007-08-31 Thread Jeff Garzik

Alan Cox wrote:

This replaces the patch which incorrectly removed the 6145

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

diff -u --new-file --recursive --exclude-from /usr/src/exclude 
linux.vanilla-2.6.23rc3-mm1/drivers/ata/pata_marvell.c 
linux-2.6.23rc3-mm1/drivers/ata/pata_marvell.c
--- linux.vanilla-2.6.23rc3-mm1/drivers/ata/pata_marvell.c  2007-08-22 
17:23:00.0 +0100
+++ linux-2.6.23rc3-mm1/drivers/ata/pata_marvell.c  2007-08-23 
13:02:02.0 +0100
@@ -190,6 +190,8 @@
 
 static const struct pci_device_id marvell_pci_tbl[] = {

{ PCI_DEVICE(0x11AB, 0x6101), },
+   { PCI_DEVICE(0x11AB, 0x6121), },
+   { PCI_DEVICE(0x11AB, 0x6123), },
{ PCI_DEVICE(0x11AB, 0x6145), },


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 #upstream-fixes] ata_piix: add Satellite U200 to broken suspend list

2007-08-31 Thread Jeff Garzik

Tejun Heo wrote:

Satellite U200 also shares the problem.  Add it to the broken suspend
list.  Original patch from John Schember.

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

diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 071d274..b827def 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -908,6 +908,13 @@ static int piix_broken_suspend(void)
},
},
{
+   .ident = Satellite U200,
+   .matches = {
+   DMI_MATCH(DMI_SYS_VENDOR, TOSHIBA),
+   DMI_MATCH(DMI_PRODUCT_NAME, Satellite U200),
+   },
+   },
+   {


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 8/8] ata: add ATA_MWDMA* and ATA_SWDMA* defines

2007-08-31 Thread Jeff Garzik

Bartlomiej Zolnierkiewicz wrote:

Cc: Jeff Garzik [EMAIL PROTECTED]
Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
---
 include/linux/ata.h |   13 +
 1 file changed, 13 insertions(+)

Index: b/include/linux/ata.h
===
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -73,6 +73,19 @@ enum {
ATA_PIO5= ATA_PIO4 | (1  5),
ATA_PIO6= ATA_PIO5 | (1  6),
 
+	ATA_SWDMA0		= (1  0),

+   ATA_SWDMA1  = ATA_SWDMA0 | (1  1),
+   ATA_SWDMA2  = ATA_SWDMA1 | (1  2),
+
+   ATA_SWDMA2_ONLY = (1  2),
+
+   ATA_MWDMA0  = (1  0),
+   ATA_MWDMA1  = ATA_MWDMA0 | (1  1),
+   ATA_MWDMA2  = ATA_MWDMA1 | (1  2),
+
+   ATA_MWDMA12_ONLY= (1  1) | (1  2),
+   ATA_MWDMA2_ONLY = (1  2),
+
ATA_UDMA0   = (1  0),
ATA_UDMA1   = ATA_UDMA0 | (1  1),
ATA_UDMA2   = ATA_UDMA1 | (1  2),


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.23-rc4] sata_promise: FastTrack TX4200 is a second-generation chip

2007-08-31 Thread Jeff Garzik

Mikael Pettersson wrote:

This patch corrects sata_promise to classify FastTrack TX4200
(DID 3515/3519) as a second-generation chip. Promise's partial-
source FT TX4200 driver confirms this classification.

Treating it as a first-generation chip causes several problems:
1. Detection failures. This is a recent regression triggered by
   the hotplug-enabling changes in 2.6.23-rc1.
2. Various failed to resume link for reset warnings.

This patch fixes http://bugzilla.kernel.org/show_bug.cgi?id=8936.

Thanks to Stephen Ziemba for reporting the bug and for testing the fix.

Signed-off-by: Mikael Pettersson [EMAIL PROTECTED]
Tested-by: Stephen Ziemba [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
---
This patch is identical to the one Stephen tested, I've
just updated the description.

 drivers/ata/sata_promise.c |6 +++---
 1 files changed, 3 insertions(+), 3 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 #upstream-fixes] libata: implement BROKEN_HPA horkage and apply it to affected drives

2007-08-31 Thread Jeff Garzik

Tejun Heo wrote:

Some drives choke on READ_NATIVE_MAX_ADDRESS[_EXT].  Implement
ATA_HORKAGE_BROKEN_HPA and apply it to affected drives.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
---
MAXTOR 6L080L4 added from bugzilla bug 7119.

 drivers/ata/libata-core.c |   11 ---
 include/linux/libata.h|1 +
 2 files changed, 9 insertions(+), 3 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


[git patches] libata fixes

2007-08-31 Thread Jeff Garzik

Fixes, some new ids, and a version bump that we discovered was missing
from several drivers.

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/ata_generic.c  |2 +-
 drivers/ata/ata_piix.c |   72 +++-
 drivers/ata/libata-core.c  |   16 +++--
 drivers/ata/pata_ali.c |2 +-
 drivers/ata/pata_amd.c |2 +-
 drivers/ata/pata_atiixp.c  |2 +-
 drivers/ata/pata_cs5520.c  |2 +-
 drivers/ata/pata_cs5530.c  |2 +-
 drivers/ata/pata_isapnp.c  |2 +-
 drivers/ata/pata_it821x.c  |2 +-
 drivers/ata/pata_marvell.c |2 +
 drivers/ata/pata_mpc52xx.c |2 +-
 drivers/ata/pata_pcmcia.c  |2 +-
 drivers/ata/pata_pdc2027x.c|2 +-
 drivers/ata/pata_platform.c|2 +-
 drivers/ata/pata_sc1200.c  |2 +-
 drivers/ata/pata_scc.c |2 +-
 drivers/ata/pata_serverworks.c |2 +-
 drivers/ata/pata_sil680.c  |2 +-
 drivers/ata/pata_sl82c105.c|2 +-
 drivers/ata/pdc_adma.c |2 +-
 drivers/ata/sata_inic162x.c|2 +-
 drivers/ata/sata_mv.c  |2 +-
 drivers/ata/sata_nv.c  |2 +-
 drivers/ata/sata_promise.c |6 ++--
 drivers/ata/sata_qstor.c   |2 +-
 drivers/ata/sata_sil.c |2 +-
 drivers/ata/sata_sil24.c   |2 +-
 drivers/ata/sata_sis.c |2 +-
 drivers/ata/sata_svw.c |2 +-
 drivers/ata/sata_sx4.c |2 +-
 drivers/ata/sata_uli.c |2 +-
 drivers/ata/sata_via.c |2 +-
 drivers/ata/sata_vsc.c |2 +-
 include/linux/ata.h|   13 +++
 include/linux/libata.h |1 +
 36 files changed, 133 insertions(+), 37 deletions(-)

Alan Cox (2):
  libata-core: Allow translation setting to fail
  pata_marvell: Add more identifiers

Bartlomiej Zolnierkiewicz (1):
  ata: add ATA_MWDMA* and ATA_SWDMA* defines

Jason Gaston (1):
  ata_piix: IDE mode SATA patch for Intel Tolapai

Jeff Garzik (1):
  [libata] Bump driver versions

Mikael Pettersson (1):
  sata_promise: FastTrack TX4200 is a second-generation chip

Tejun Heo (3):
  ata_piix: add Satellite U200 to broken suspend list
  libata: implement BROKEN_HPA horkage and apply it to affected drives
  ata_piix: implement IOCFG bit18 quirk

diff --git a/drivers/ata/ata_generic.c b/drivers/ata/ata_generic.c
index 430fcf4..9454669 100644
--- a/drivers/ata/ata_generic.c
+++ b/drivers/ata/ata_generic.c
@@ -26,7 +26,7 @@
 #include linux/libata.h
 
 #define DRV_NAME ata_generic
-#define DRV_VERSION 0.2.12
+#define DRV_VERSION 0.2.13
 
 /*
  * A generic parallel ATA driver using libata
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 071d274..e40c94f 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -94,7 +94,7 @@
 #include linux/dmi.h
 
 #define DRV_NAME   ata_piix
-#define DRV_VERSION2.11
+#define DRV_VERSION2.12
 
 enum {
PIIX_IOCFG  = 0x54, /* IDE I/O configuration register */
@@ -130,6 +130,7 @@ enum {
ich6m_sata_ahci = 8,
ich8_sata_ahci  = 9,
piix_pata_mwdma = 10,   /* PIIX3 MWDMA only */
+   tolapai_sata_ahci   = 11,
 
/* constants for mapping table */
P0  = 0,  /* port 0 */
@@ -253,6 +254,8 @@ static const struct pci_device_id piix_pci_tbl[] = {
{ 0x8086, 0x292d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
/* SATA Controller IDE (ICH9M) */
{ 0x8086, 0x292e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
+   /* SATA Controller IDE (Tolapai) */
+   { 0x8086, 0x5028, PCI_ANY_ID, PCI_ANY_ID, 0, 0, tolapai_sata_ahci },
 
{ } /* terminate list */
 };
@@ -441,12 +444,25 @@ static const struct piix_map_db ich8_map_db = {
},
 };
 
+static const struct piix_map_db tolapai_map_db = {
+.mask = 0x3,
+.port_enable = 0x3,
+.map = {
+/* PM   PS   SM   SS   MAP */
+{  P0,  NA,  P1,  NA }, /* 00b */
+{  RV,  RV,  RV,  RV }, /* 01b */
+{  RV,  RV,  RV,  RV }, /* 10b */
+{  RV,  RV,  RV,  RV },
+},
+};
+
 static const struct piix_map_db *piix_map_db_table[] = {
[ich5_sata] = ich5_map_db,
[ich6_sata] = ich6_map_db,
[ich6_sata_ahci]= ich6_map_db,
[ich6m_sata_ahci]   = ich6m_map_db,
[ich8_sata_ahci]= ich8_map_db,
+   [tolapai_sata_ahci] = tolapai_map_db,
 };
 
 static struct ata_port_info piix_port_info[] = {
@@ -560,6 +576,17 @@ static struct ata_port_info piix_port_info[] = {
.mwdma_mask = 0x06, /* mwdma1-2 ?? CHECK 0 should be ok but 
slow */
.port_ops   = piix_pata_ops

Re: [PATCH 1/2 #upstream] libata: udpate ata_dev_try_classify() arguments

2007-08-31 Thread Jeff Garzik

Tejun Heo wrote:

Make ata_dev_try_classify() take a pointer to ata_device instead of
ata_port/port_number combination for consistency and add @present
argument.  @present indicates whether the device seems present during
reset.  It's the result of TF access during softreset and link
onlineness during hardreset.  @present will be used to improve
diagnostic failure handling.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
---
 drivers/ata/libata-core.c |   31 +--
 drivers/ata/pata_scc.c|6 --
 drivers/ata/sata_mv.c |2 +-
 include/linux/libata.h|3 ++-
 4 files changed, 24 insertions(+), 18 deletions(-)


ACK patches 1-2

request rediff+resend


-
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: Switch most of the remaining SFF drivers to ata_sff_port_start

2007-08-31 Thread Jeff Garzik

Alan Cox wrote:

This avoids allocating DMA buffers if not needed but at the moment is
mostly just a neatness item.

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


applied sans pata_acpi change, which is because pata_acpi is not in 
libata-dev.git#upstream



-
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: Strict checking for identify reporting

2007-08-31 Thread Jeff Garzik

Alan Cox wrote:

The ATA specifications require checks on certain flags before assuming
the validity of other data. Go through the methods and correct those
needing extra checks. Also note limits on ata_id_major_version with
respect to ATA-1 and ATA-2. Correct the 32bit PIO check.

Wants to sit in -mm for a bit in case of a screwup on my part that I
didn't hit on the test drives and also in case someone, somewhere has
a drive that gets it wrong.

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 2.6.23-rc3] libata: pata_pdc2027x PLL detection minor cleanup

2007-08-31 Thread Jeff Garzik

Albert Lee wrote:

Minor cleanup to remove the unneeded rmb()s per Jeff's advice. Also removed the
pll_clock  0 check since pll_clock now guaranteed to be = 0 after Mikael's 
patch.

Signed-off-by: Albert Lee [EMAIL PROTECTED]
---
Tested ok on both x86 and ppc64, together with Mikael's patch.


applied to #upstream


-
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-dev#upstream 3/3 REGENERATED] libata: implement and use ata_port_desc() to report port configuration

2007-08-31 Thread Jeff Garzik

Tejun Heo wrote:

Currently, port configuration reporting has the following problems.

* iomapped address is reported instead of raw address
* report contains irrelevant fields or lacks necessary fields for
  non-SFF controllers.
* host-irq/irq2 are there just for reporting and hacky.

This patch implements and uses ata_port_desc() and
ata_port_pbar_desc().  ata_port_desc() is almost identical to
ata_ehi_push_desc() except that it takes @ap instead of @ehi, has no
locking requirement, can only be used during host initialization and 
 is used as separator instead of , .  ata_port_pbar_desc() is a
helper to ease reporting of a PCI BAR or an offsetted address into it.

LLD pushes whatever description it wants using the above two
functions.  The accumulated description is printed on host
registration after [S/P]ATA max MAX_XFERMODE .

SFF init helpers and ata_host_activate() automatically add
descriptions for addresses and irq respectively, so only LLDs which
isn't standard SFF need to add custom descriptions.  In many cases,
such controllers need to report different things anyway.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
---
Regenerated against the current #upstream (41b135c7).


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 libata-dev#upstream REGENERATED] libata: move EH repeat reporting into ata_eh_report()

2007-08-31 Thread Jeff Garzik

Tejun Heo wrote:

EH is sometimes repeated without any error or action.  For example,
this happens when probing IDENTIFY fails because of a phantom device.
In these cases, all the repeated EH does is making sure there is no
unhandled error or pending action and return.  This repeation is
necessary to avoid losing any event which occurred while EH was in
progress.

Unfortunately, this dry run causes annonying EH pending after
completion message.  This patch moves the repeat reporting into
ata_eh_report() such that it's more compact and skipped on dry runs.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
Cc: Mikael Pettersson [EMAIL PROTECTED]
---
Regenerated against #upstream (41b135c7) +
implement-and-use-ata_port_desc patch.

 drivers/ata/libata-eh.c |   30 ++
 include/linux/libata.h  |5 +++--
 2 files changed, 21 insertions(+), 14 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] libata-portmap: Remove unused definitions

2007-08-31 Thread Jeff Garzik

Alan Cox wrote:

With the PCI layer properly handling legacy IDE and the kernel now using
it these can go

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 1/1] AVR32 PATA driver

2007-08-31 Thread Jeff Garzik

Kristoffer Nyborg Gregertsen wrote:

Updated and simplified driver. Use only register transfer timing for both
data and register transfers. This gives poorer performance in PIO1 and 2,
but should not be a problem in PIO3 and 4, correct me if I'm wrong :)

The driver works very we'll but I still wonder about the interrupts. I have
an interrupt line, that works nicely when POLLING flag is not set. The
problem is the number of interrupts that eat away my CPU cycles.

When using the POLLING flag there seem to be some interrupts that dosen't get
cleared. Furthermore the device dosen't drive INTRQ high, it stays at 2.5 volts
and generates a lot of interrupts due to ripple / noise. What to do?

Signed-off-by: Kristoffer Nyborg Gregertsen [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 take #6] [libata] libata driver for bf548 on chip ATAPI controller.

2007-08-31 Thread Jeff Garzik

Sonic Zhang wrote:

Fix all issues pointed out in Jeff's email.

Acked-by: Alan Cox [EMAIL PROTECTED]
Signed-off-by: Sonic Zhang [EMAIL PROTECTED]
---
 drivers/ata/Kconfig  |   16
 drivers/ata/Makefile |1
 drivers/ata/pata_bf54x.c | 1627 
+++
 3 files changed, 1644 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: sata_via: write errors on PATA drive connected to VT6421

2007-09-01 Thread Jeff Garzik

Ondrej Zary wrote:

Hello,
I think that I've found and fixed the problem. There is a copy/paste bug in 
vt6421_set_dma_mode() function which causes wrong values to be written to 
PATA_UDMA_TIMING register.



This patch fixes a copy/paste bug that breaks DMA modes on VT6421 PATA port.

Signed-off-by: Ondrej Zary [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] sata_mv: Test patch for Hightpoint RocketRaid 1740/1742

2007-09-01 Thread Jeff Garzik

Krzysztof Oledzki wrote:

On 2007-08-01 17:46, Alan Cox wrote:

On Wed, 01 Aug 2007 09:49:19 -0400
Jeff Garzik [EMAIL PROTECTED] wrote:


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.c2007-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 },

Is this still a test patch, or can it go upstream?


Upstream


Are you sure that 1740/1742 are 508x (GEN I)? According to these [1] 
pictures there may be a 6042 chipset (GEN IIe) placed onboard.


[1] http://www.highpoint-tech.com/image/products/SATAII/RR1740_card_big.jpg
http://www.highpoint-tech.com/image/products/eSATA/RR1742_card_big.jpg


Good evidence!

SATAII is also an indicator that it is not 508x.

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] drivers/firmware: const-ify DMI API and internals

2007-09-01 Thread Jeff Garzik

commit 457b6eb3bf3341d2e143518a0bb99ffbb8d754c4
Author: Jeff Garzik [EMAIL PROTECTED]
Date:   Sat Sep 1 10:16:45 2007 -0400

drivers/firmware: const-ify DMI API and internals

Three main sets of changes:

1) dmi_get_system_info() return value should have been marked const,
   since callers should not be changing that data.

2) const-ify DMI internals, since DMI firmware tables should,
   whenever possible, be marked const to ensure we never ever write to
   that data area.

3) const-ify DMI API, to enable marking tables const where possible
   in low-level drivers.

And if we're really lucky, this might enable some additional
optimizations on the part of the compiler.

The bulk of the changes are #2 and #3, which are interrelated.  #1 could
have been a separate patch, but it was so small compared to the others,
it was easier to roll it into this changeset.

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

 arch/i386/kernel/apm.c  |   18 
 arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c |4 -
 arch/i386/kernel/reboot.c   |2 
 arch/i386/mach-generic/bigsmp.c |4 -
 arch/i386/pci/common.c  |4 -
 arch/i386/pci/irq.c |4 -
 drivers/acpi/osl.c  |2 
 drivers/acpi/processor_idle.c   |2 
 drivers/acpi/sleep/main.c   |2 
 drivers/acpi/thermal.c  |8 +--
 drivers/ata/ata_piix.c  |4 -
 drivers/ata/pata_ali.c  |2 
 drivers/ata/pata_cs5530.c   |2 
 drivers/ata/pata_via.c  |2 
 drivers/char/i8k.c  |4 -
 drivers/char/ipmi/ipmi_si_intf.c|9 ++--
 drivers/firmware/dmi_scan.c |   57 +++-
 drivers/hwmon/abituguru.c   |2 
 drivers/hwmon/applesmc.c|2 
 drivers/hwmon/hdaps.c   |4 -
 drivers/ide/pci/alim15x3.c  |2 
 drivers/ide/pci/via82cxxx.c |2 
 drivers/input/misc/wistron_btns.c   |2 
 drivers/input/mouse/lifebook.c  |6 +-
 drivers/input/mouse/synaptics.c |2 
 drivers/misc/msi-laptop.c   |2 
 drivers/misc/sony-laptop.c  |4 -
 drivers/misc/thinkpad_acpi.c|2 
 drivers/pnp/pnpbios/core.c  |2 
 drivers/usb/host/uhci-hcd.c |2 
 drivers/video/imacfb.c  |2 
 include/linux/dmi.h |   22 +-
 32 files changed, 97 insertions(+), 91 deletions(-)

457b6eb3bf3341d2e143518a0bb99ffbb8d754c4
diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c
index f02a8ac..32f2365 100644
--- a/arch/i386/kernel/apm.c
+++ b/arch/i386/kernel/apm.c
@@ -1869,7 +1869,7 @@ static struct miscdevice apm_device = {
 
 
 /* Simple print if true callback */
-static int __init print_if_true(struct dmi_system_id *d)
+static int __init print_if_true(const struct dmi_system_id *d)
 {
printk(%s\n, d-ident);
return 0;
@@ -1879,14 +1879,14 @@ static int __init print_if_true(struct dmi_system_id *d)
  * Some Bioses enable the PS/2 mouse (touchpad) at resume, even if it was
  * disabled before the suspend. Linux used to get terribly confused by that.
  */
-static int __init broken_ps2_resume(struct dmi_system_id *d)
+static int __init broken_ps2_resume(const struct dmi_system_id *d)
 {
printk(KERN_INFO %s machine detected. Mousepad Resume Bug workaround 
hopefully not needed.\n, d-ident);
return 0;
 }
 
 /* Some bioses have a broken protected mode poweroff and need to use realmode 
*/
-static int __init set_realmode_power_off(struct dmi_system_id *d)
+static int __init set_realmode_power_off(const struct dmi_system_id *d)
 {
if (apm_info.realmode_power_off == 0) {
apm_info.realmode_power_off = 1;
@@ -1896,7 +1896,7 @@ static int __init set_realmode_power_off(struct 
dmi_system_id *d)
 }
 
 /* Some laptops require interrupts to be enabled during APM calls */
-static int __init set_apm_ints(struct dmi_system_id *d)
+static int __init set_apm_ints(const struct dmi_system_id *d)
 {
if (apm_info.allow_ints == 0) {
apm_info.allow_ints = 1;
@@ -1906,7 +1906,7 @@ static int __init set_apm_ints(struct dmi_system_id *d)
 }
 
 /* Some APM bioses corrupt memory or just plain do not work */
-static int __init apm_is_horked(struct dmi_system_id *d)
+static int __init apm_is_horked(const struct dmi_system_id *d)
 {
if (apm_info.disabled == 0) {
apm_info.disabled = 1;
@@ -1915,7 +1915,7 @@ static int __init apm_is_horked(struct dmi_system_id *d)
return 0;
 }
 
-static int __init apm_is_horked_d850md(struct dmi_system_id *d

Re: [PATCH] drivers/firmware: const-ify DMI API and internals

2007-09-01 Thread Jeff Garzik

Greg KH wrote:

On Sat, Sep 01, 2007 at 10:27:19AM -0400, Jeff Garzik wrote:

commit 457b6eb3bf3341d2e143518a0bb99ffbb8d754c4
Author: Jeff Garzik [EMAIL PROTECTED]
Date:   Sat Sep 1 10:16:45 2007 -0400

drivers/firmware: const-ify DMI API and internals

Three main sets of changes:

1) dmi_get_system_info() return value should have been marked const,

   since callers should not be changing that data.

2) const-ify DMI internals, since DMI firmware tables should,

   whenever possible, be marked const to ensure we never ever write to
   that data area.

3) const-ify DMI API, to enable marking tables const where possible

   in low-level drivers.

And if we're really lucky, this might enable some additional

optimizations on the part of the compiler.

The bulk of the changes are #2 and #3, which are interrelated.  #1 could

have been a separate patch, but it was so small compared to the others,
it was easier to roll it into this changeset.



Looks great to me, do you want me to take this through my driver tree?
I'd be glad to do so.


I was just going to push it myself, but have no strong feelings on the 
matter.


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 critical fixes

2007-09-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/ata_piix.c |5 -
 drivers/ata/sata_via.c |2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

Jeff Garzik (1):
  [libata] ata_piix: properly terminate DMI system list

Ondrej Zary (1):
  Fix sata_via write errors on PATA drive connected to VT6421

diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index e40c94f..3b8bf18 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -955,7 +955,8 @@ static int piix_broken_suspend(void)
DMI_MATCH(DMI_PRODUCT_NAME, PORTEGE M500),
},
},
-   { }
+
+   { } /* terminate list */
};
static const char *oemstrs[] = {
Tecra M3,,
@@ -1187,6 +1188,8 @@ static void piix_iocfg_bit18_quirk(struct pci_dev *pdev)
DMI_MATCH(DMI_PRODUCT_NAME, M570U),
},
},
+
+   { } /* terminate list */
};
u32 iocfg;
 
diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c
index a4e6317..57fd30d 100644
--- a/drivers/ata/sata_via.c
+++ b/drivers/ata/sata_via.c
@@ -371,7 +371,7 @@ static void vt6421_set_dma_mode(struct ata_port *ap, struct 
ata_device *adev)
 {
struct pci_dev *pdev = to_pci_dev(ap-host-dev);
static const u8 udma_bits[] = { 0xEE, 0xE8, 0xE6, 0xE4, 0xE2, 0xE1, 
0xE0, 0xE0 };
-   pci_write_config_byte(pdev, PATA_UDMA_TIMING, udma_bits[adev-pio_mode 
- XFER_UDMA_0]);
+   pci_write_config_byte(pdev, PATA_UDMA_TIMING, udma_bits[adev-dma_mode 
- XFER_UDMA_0]);
 }
 
 static const unsigned int svia_bar_sizes[] = {
-
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/13] ide: add IDE_HFLAG_ERROR_STOPS_FIFO host flag

2007-09-06 Thread Jeff Garzik
On Wed, Sep 05, 2007 at 11:52:57PM +0200, Bartlomiej Zolnierkiewicz wrote:
 
 Add IDE_HFLAG_ERROR_STOPS_FIFO host flag and use it instead
 of hwif-err_stops_fifo.  As a side-effect this change fixes
 hwif-err_stops_fifo not being restored by ide_hwif_restore().
 
 Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
 ---
  drivers/ide/ide-io.c   |3 ++-
  drivers/ide/pci/pdc202xx_new.c |3 +--
  drivers/ide/pci/pdc202xx_old.c |8 
  include/linux/ide.h|3 ++-
  4 files changed, 9 insertions(+), 8 deletions(-)

Hum, I wonder if libata needs something like this.

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.23-rc4][reRESEND] ahci: RAID mode SATA patch for Intel Tolapai

2007-09-07 Thread Jeff Garzik

Gaston, Jason D wrote:

-Original Message-
From: Gaston, Jason D
Sent: Friday, August 31, 2007 10:10 AM
To: 'Jeff Garzik'
Cc: linux-ide@vger.kernel.org; [EMAIL PROTECTED]
Subject: RE: [PATCH 2.6.23-rc4][reRESEND] ahci: RAID mode SATA patch

for

Intel Tolapai

This device has both AHCI and RAID modes that use the ahci driver.

Only

the RAID mode DID's are being added as the PCI class code support will
cover the AHCI mode.  Looking at the Generic, PCI class code support
section, it uses board_ahci.  I assumed that they should be the same

as

the generic class code support is working on this platform.

Thanks,

Jason



-Original Message-
From: Jeff Garzik [mailto:[EMAIL PROTECTED]
Sent: Friday, August 31, 2007 12:47 AM
To: Gaston, Jason D
Cc: linux-ide@vger.kernel.org; [EMAIL PROTECTED]
Subject: Re: [PATCH 2.6.23-rc4][reRESEND] ahci: RAID mode SATA patch

for

Intel Tolapai

Jason Gaston wrote:

Resend trying to remove 8-bit characters in the email.

This patch adds the Intel Tolapai RAID controller DID's for SATA

support.

Signed-off-by:  Jason Gaston [EMAIL PROTECTED]

--- linux-2.6.23-rc4/drivers/ata/ahci.c.orig2007-08-27

18:32:35.0 -0700

+++ linux-2.6.23-rc4/drivers/ata/ahci.c 2007-08-28

16:58:11.0 -

0700

@@ -411,6 +411,8 @@
{ PCI_VDEVICE(INTEL, 0x292f), board_ahci_pi }, /* ICH9M */
{ PCI_VDEVICE(INTEL, 0x294d), board_ahci_pi }, /* ICH9 */
{ PCI_VDEVICE(INTEL, 0x294e), board_ahci_pi }, /* ICH9M */
+   { PCI_VDEVICE(INTEL, 0x502a), board_ahci }, /* Tolapai */
+   { PCI_VDEVICE(INTEL, 0x502b), board_ahci }, /* Tolapai */

Why did you not use board_ahci_pi?  Is the AHCI ports-implemented
register unreliable on this platform?


Jeff,

Do I need to change this to board_ahci_pi or is it ok to leave it at
board_ahci, which will be used by the AHCI class code devices?


You are the one who needs to answer this question ;-)

Most new Intel AHCI have a sane and reliable Ports-Implemented register 
value even across reset, unlike earlier ones or some clones.  For those, 
we use board_ahci_pi.


If PI is not reliable across reset or if BIOS is absent (yes we care 
about that case, when we do our own PCI resume for example), then you 
should use board_ahci.


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: [RFT][PATCH v7] sata_mv: convert to new EH

2007-09-07 Thread Jeff Garzik

dean gaudet wrote:

On Fri, 13 Jul 2007, greg wrote:


dean gaudet dean at arctic.org writes:
if you've got any other workload you'd like me to throw at it, 
let me know.  
I've had a few problems with the driver in 2.6.20 (fc6xen x86_64). The machine 
tended to lock up after a random period of time (from a few minutes upwards), 
without any messages. Performing a smartctl on all the disks, or leaving smartd 
running, seemed to speed up the rate at which the crash occurred. What I found 
was that by moving the sata_mv device onto it's own bus (or a bus with two 
sata_mv devices), the crashes went away. Are you doing tests with the 
controller sharing a bus with other devices?


Is there an merit to my observation that it might be an issue with devices 
sharing a PCI-X bus?


Cards: Supermicro 5081 (SAT-MV8), Supermicro 6081 (SAT2-MV8), Highpoint 5081 
(RocketRaid 1820A v1.1). Motherboards: Tyan S2882, AMD 8131 chipset; IBM x206, 
Intel 6300ESB.


hmm!  i don't seem to have replied to this.

you know, i've seen this problem.  the first time it happened was with a 
promise ultra tx/100 or tx/133 (on a dual k7 box, two controllers on the 
same bus certainly)... a 5 minute cronjob logging HD temperatures via 
smart would occasionally cause one of the disks to just disappear, return 
errors on every request, and required a reboot to rediscover it.  
eliminating the cronjob stopped the problem.


Promise cards, in particular, snoop the ATA commands and occasionally 
update registers and do other internal magic based upon those commands.


It is possible that SMART commands have the same requirements as SET 
FEATURES - XFER MODE: namely, all ports must be idle when the command is 
issued, not just the port in question.


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] libata: Add a drivers/ide style DMA disable

2007-09-07 Thread Jeff Garzik

Tejun Heo wrote:

Alan Cox wrote:

This is useful when debugging, handling problem systems, or for
distributions just to get the system installed so it can be sorted
out later.

This is a bit smarter than the old IDE one and lets you do

libata.pata_dma=0   Disable all PATA DMA like old IDE
libata.pata_dma=1   Disk DMA only
libata.pata_dma=2   ATAPI DMA only
libata.pata_dma=4   CF DMA only

(or combinations thereof - 0,1,3 being the useful ones I suspect)

(I've split CF as it seems to be a seperate case of pain and suffering
different to the others and caused by assorted PIO wired adapters etc)

SATA is not affected - for one its not clear it makes sense to disable
DMA for SATA if even always possible, for two we've seen no failure 
evidence to justify needing to support this kind of hammer on SATA.


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


Acked-by: Tejun Heo [EMAIL PROTECTED]


FWIW -- as I noted to Alan personally at KS, I would rather drop the 
pata_ and have it apply to all, PATA or SATA.


It is far less useful on SATA, but I can still see a possibility that 
somebody might want to avoid DMA for whatever reason, chiefly, possibly 
keeping failing hardware alive by slowing things down via PIO.  And 
being able to avoid the DMA protocols can be useful for debugging or 
other things.


As an aside, it would be nice to get the EH in shape where it can pause 
all ports, so we can finally allow userspace to submit SET FEATURES - 
XFER MODE and have it handled cleanly and properly.


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: ICH Intel PATA short cable override...

2007-09-07 Thread Jeff Garzik

Mark Lord wrote:

Ditto for selecting transfer modes.



Waiting on one thing AFAICS:

ability to drain/idle all ports +
issue a command on one port +
resume normal parallel port operation

SET FEATURES - XFER MODE is special in that it requires all sorts of 
additional controller handling and careful cross-port synchronization.


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.23-rc4][reRESEND] ata_piix: IDE mode SATA patch for Intel Tolapai

2007-09-07 Thread Jeff Garzik

Gaston, Jason D wrote:

-Original Message-
From: Jeff Garzik [mailto:[EMAIL PROTECTED]
Sent: Friday, August 31, 2007 12:51 AM
To: Gaston, Jason D
Cc: linux-ide@vger.kernel.org; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: Re: [PATCH 2.6.23-rc4][reRESEND] ata_piix: IDE mode SATA patch

for

Intel Tolapai

Jason Gaston wrote:

Resend trying to remove 8-bit characters in the email.

This patch adds the Intel Tolapai IDE mode SATA controller DID's.

Signed-off-by:  Jason Gaston [EMAIL PROTECTED]

applied


Jeff,

I just noticed that the following section came through as spaces instead
of tabs.  Do I need to resend a corrected version?

+static const struct piix_map_db tolapai_map_db = {
+.mask = 0x3,
+.port_enable = 0x3,
+.map = {
+/* PM   PS   SM   SS   MAP */
+{  P0,  NA,  P1,  NA }, /* 00b */
+{  RV,  RV,  RV,  RV }, /* 01b */
+{  RV,  RV,  RV,  RV }, /* 10b */
+{  RV,  RV,  RV,  RV },
+},
+};


that's always nice, yes :)

even better would be to run a script through #upstream, accomplishing 
the same thing but for many drivers ;-)



-
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


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