[git patch] libata fix

2007-10-02 Thread Jeff Garzik

Make another laptop's suspend work.


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 |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)

Tejun Heo (1):
  ata_piix: add another TECRA M3 entry to broken suspend list

diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 3b8bf18..6996eb5 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -921,6 +921,13 @@ static int piix_broken_suspend(void)
 {
static struct dmi_system_id sysids[] = {
{
+   .ident = "TECRA M3",
+   .matches = {
+   DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
+   DMI_MATCH(DMI_PRODUCT_NAME, "TECRA M3"),
+   },
+   },
+   {
.ident = "TECRA M5",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[git patch] libata fix

2007-06-04 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/libata-core.c |   13 -
 drivers/ata/pata_via.c|   12 ++--
 include/linux/libata.h|1 -
 3 files changed, 10 insertions(+), 16 deletions(-)

Tejun Heo (1):
  libata: always use polling SETXFER

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index af62514..4733f00 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3933,10 +3933,13 @@ static unsigned int ata_dev_set_xfermode(struct 
ata_device *dev)
/* set up set-features taskfile */
DPRINTK("set features - xfer mode\n");
 
+   /* Some controllers and ATAPI devices show flaky interrupt
+* behavior after setting xfer mode.  Use polling instead.
+*/
ata_tf_init(dev, &tf);
tf.command = ATA_CMD_SET_FEATURES;
tf.feature = SETFEATURES_XFER;
-   tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
+   tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE | ATA_TFLAG_POLLING;
tf.protocol = ATA_PROT_NODATA;
tf.nsect = dev->xfer_mode;
 
@@ -5414,14 +5417,6 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc)
}
}
 
-   /* Some controllers show flaky interrupt behavior after
-* setting xfer mode.  Use polling instead.
-*/
-   if (unlikely(qc->tf.command == ATA_CMD_SET_FEATURES &&
-qc->tf.feature == SETFEATURES_XFER) &&
-   (ap->flags & ATA_FLAG_SETXFER_POLLING))
-   qc->tf.flags |= ATA_TFLAG_POLLING;
-
/* select the device */
ata_dev_select(ap, qc->dev->devno, 1, 0);
 
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
index a8462f1..63eca29 100644
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -452,7 +452,7 @@ static int via_init_one(struct pci_dev *pdev, const struct 
pci_device_id *id)
/* Early VIA without UDMA support */
static const struct ata_port_info via_mwdma_info = {
.sht = &via_sht,
-   .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SETXFER_POLLING,
+   .flags = ATA_FLAG_SLAVE_POSS,
.pio_mask = 0x1f,
.mwdma_mask = 0x07,
.port_ops = &via_port_ops
@@ -460,7 +460,7 @@ static int via_init_one(struct pci_dev *pdev, const struct 
pci_device_id *id)
/* Ditto with IRQ masking required */
static const struct ata_port_info via_mwdma_info_borked = {
.sht = &via_sht,
-   .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SETXFER_POLLING,
+   .flags = ATA_FLAG_SLAVE_POSS,
.pio_mask = 0x1f,
.mwdma_mask = 0x07,
.port_ops = &via_port_ops_noirq,
@@ -468,7 +468,7 @@ static int via_init_one(struct pci_dev *pdev, const struct 
pci_device_id *id)
/* VIA UDMA 33 devices (and borked 66) */
static const struct ata_port_info via_udma33_info = {
.sht = &via_sht,
-   .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SETXFER_POLLING,
+   .flags = ATA_FLAG_SLAVE_POSS,
.pio_mask = 0x1f,
.mwdma_mask = 0x07,
.udma_mask = 0x7,
@@ -477,7 +477,7 @@ static int via_init_one(struct pci_dev *pdev, const struct 
pci_device_id *id)
/* VIA UDMA 66 devices */
static const struct ata_port_info via_udma66_info = {
.sht = &via_sht,
-   .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SETXFER_POLLING,
+   .flags = ATA_FLAG_SLAVE_POSS,
.pio_mask = 0x1f,
.mwdma_mask = 0x07,
.udma_mask = 0x1f,
@@ -486,7 +486,7 @@ static int via_init_one(struct pci_dev *pdev, const struct 
pci_device_id *id)
/* VIA UDMA 100 devices */
static const struct ata_port_info via_udma100_info = {
.sht = &via_sht,
-   .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SETXFER_POLLING,
+   .flags = ATA_FLAG_SLAVE_POSS,
.pio_mask = 0x1f,
.mwdma_mask = 0x07,
.udma_mask = 0x3f,
@@ -495,7 +495,7 @@ static int via_init_one(struct pci_dev *pdev, const struct 
pci_device_id *id)
/* UDMA133 with bad AST (All current 133) */
static const struct ata_port_info via_udma133_info = {
.sht = &via_sht,
-   .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SETXFER_POLLING,
+   .flags = ATA_FLAG_SLAVE_POSS,
.pio_mask = 0x1f,
.mwdma_mask = 0x07,
.udma_mask = 0x7f,  /* FIXME: should check north bridge */
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 85f7b1b..a6a3113 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -171,7 +171,6 @@ enum {
ATA_FLAG_SKIP_D2H_BSY   = (1 << 12), /* can't wait for t

[git patch] libata fix

2005-07-31 Thread Jeff Garzik

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

to obtain the damnable-annoying[1] fix described in the attached 
diffstat/changelog/patch.


Jeff


[1] the option is truly a boolean, that enables or disables a menu (not 
any code).  But it won't work as a boolean apparently :/  Roman doesn't 
have any better suggestions, so oh well.


 drivers/scsi/Kconfig |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


commit faa725332f39329288f52b7f872ffda866ba5b09
Author: Adrian Bunk <[EMAIL PROTECTED]>
Date:   Wed Jul 27 01:06:35 2005 -0700

[PATCH] SCSI_SATA has to be a tristate

SCSI=m must disallow static drivers.

The problem is that all the SATA drivers depend on SCSI_SATA.

With SCSI=m and SCSI_SATA=y this allows the static enabling of the SATA
drivers with unwanted effects, e.g.:
- SCSI=m, SCSI_SATA=y, SCSI_ATA_ADMA=y
  -> SCSI_ATA_ADMA is built statically but scsi/built-in.o is not linked
 into the kernel
- SCSI=m, SCSI_SATA=y, SCSI_ATA_ADMA=y, SCSI_SATA_AHCI=m
  -> SCSI_ATA_ADMA and libata are built statically but
 scsi/built-in.o is not linked into the kernel,
 SCSI_SATA_AHCI is built modular (unresolved symbols due to missing
  libata)

Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>
Cc: Jeff Garzik <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>


diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -424,7 +424,7 @@ config SCSI_IN2000
 source "drivers/scsi/megaraid/Kconfig.megaraid"
 
 config SCSI_SATA
-   bool "Serial ATA (SATA) support"
+   tristate "Serial ATA (SATA) support"
depends on SCSI
help
  This driver family supports Serial ATA host controllers