mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-ide@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: [git patches] libata fixes
Date: Tue, 4 Dec 2007 15:10:07 -0500	[thread overview]
Message-ID: <20071204201007.GA20326@havoc.gtf.org> (raw)


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/ahci.c     |    4 ++++
 drivers/ata/pata_amd.c |    5 +++--
 drivers/ata/pata_via.c |    4 ++--
 drivers/ata/sata_mv.c  |    9 +++++++++
 drivers/ata/sata_nv.c  |   32 +++++++++++++++++++++++---------
 5 files changed, 41 insertions(+), 13 deletions(-)

Bartlomiej Zolnierkiewicz (1):
      pata_amd/pata_via: de-couple programming of PIO/MWDMA and UDMA timings

Mark Lord (1):
      sata_mv:  Warn about HPT RocketRAID BIOS treatment of "Legacy" drives

Robert Hancock (1):
      sata_nv: don't use legacy DMA in ADMA mode (v3)

peerchen (1):
      ahci: add the Device IDs of MCP79 AHCI controller to ahci.c

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index ed9b407..4688dbf 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -536,6 +536,10 @@ static const struct pci_device_id ahci_pci_tbl[] = {
 	{ PCI_VDEVICE(NVIDIA, 0x0ad9), board_ahci },		/* MCP77 */
 	{ PCI_VDEVICE(NVIDIA, 0x0ada), board_ahci },		/* MCP77 */
 	{ PCI_VDEVICE(NVIDIA, 0x0adb), board_ahci },		/* MCP77 */
+	{ PCI_VDEVICE(NVIDIA, 0x0ab4), board_ahci },		/* MCP79 */
+	{ PCI_VDEVICE(NVIDIA, 0x0ab5), board_ahci },		/* MCP79 */
+	{ PCI_VDEVICE(NVIDIA, 0x0ab6), board_ahci },		/* MCP79 */
+	{ PCI_VDEVICE(NVIDIA, 0x0ab7), board_ahci },		/* MCP79 */
 	{ PCI_VDEVICE(NVIDIA, 0x0ab8), board_ahci },		/* MCP79 */
 	{ PCI_VDEVICE(NVIDIA, 0x0ab9), board_ahci },		/* MCP79 */
 	{ PCI_VDEVICE(NVIDIA, 0x0aba), board_ahci },		/* MCP79 */
diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c
index c5779ad..3cc27b5 100644
--- a/drivers/ata/pata_amd.c
+++ b/drivers/ata/pata_amd.c
@@ -25,7 +25,7 @@
 #include <linux/libata.h>
 
 #define DRV_NAME "pata_amd"
-#define DRV_VERSION "0.3.9"
+#define DRV_VERSION "0.3.10"
 
 /**
  *	timing_setup		-	shared timing computation and load
@@ -115,7 +115,8 @@ static void timing_setup(struct ata_port *ap, struct ata_device *adev, int offse
 	}
 
 	/* UDMA timing */
-	pci_write_config_byte(pdev, offset + 0x10 + (3 - dn), t);
+	if (at.udma)
+		pci_write_config_byte(pdev, offset + 0x10 + (3 - dn), t);
 }
 
 /**
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
index a4175fb..453d72b 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.2"
+#define DRV_VERSION "0.3.3"
 
 /*
  *	The following comes directly from Vojtech Pavlik's ide/pci/via82cxxx
@@ -296,7 +296,7 @@ static void via_do_set_mode(struct ata_port *ap, struct ata_device *adev, int mo
 	}
 
 	/* Set UDMA unless device is not UDMA capable */
-	if (udma_type) {
+	if (udma_type && t.udma) {
 		u8 cable80_status;
 
 		/* Get 80-wire cable detection bit */
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 8d864e5..fe0105d 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -2503,6 +2503,15 @@ static int mv_chip_id(struct ata_host *host, unsigned int board_idx)
 
 	case chip_7042:
 		hp_flags |= MV_HP_PCIE;
+		if (pdev->vendor == PCI_VENDOR_ID_TTI &&
+		    (pdev->device == 0x2300 || pdev->device == 0x2310))
+		{
+			printk(KERN_WARNING "sata_mv: Highpoint RocketRAID BIOS"
+				" will CORRUPT DATA on attached drives when"
+				" configured as \"Legacy\".  BEWARE!\n");
+			printk(KERN_WARNING "sata_mv: Use BIOS \"JBOD\" volumes"
+				" instead for safety.\n");
+		}
 	case chip_6042:
 		hpriv->ops = &mv6xxx_ops;
 		hp_flags |= MV_HP_GEN_IIE;
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index 44f9e5d..ed5dc7c 100644
--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -791,11 +791,13 @@ static int nv_adma_check_atapi_dma(struct ata_queued_cmd *qc)
 
 static void nv_adma_tf_read(struct ata_port *ap, struct ata_taskfile *tf)
 {
-	/* Since commands where a result TF is requested are not
-	   executed in ADMA mode, the only time this function will be called
-	   in ADMA mode will be if a command fails. In this case we
-	   don't care about going into register mode with ADMA commands
-	   pending, as the commands will all shortly be aborted anyway. */
+	/* Other than when internal or pass-through commands are executed,
+	   the only time this function will be called in ADMA mode will be
+	   if a command fails. In the failure case we don't care about going
+	   into register mode with ADMA commands pending, as the commands will
+	   all shortly be aborted anyway. We assume that NCQ commands are not
+	   issued via passthrough, which is the only way that switching into
+	   ADMA mode could abort outstanding commands. */
 	nv_adma_register_mode(ap);
 
 	ata_tf_read(ap, tf);
@@ -1359,11 +1361,9 @@ static int nv_adma_use_reg_mode(struct ata_queued_cmd *qc)
 	struct nv_adma_port_priv *pp = qc->ap->private_data;
 
 	/* ADMA engine can only be used for non-ATAPI DMA commands,
-	   or interrupt-driven no-data commands, where a result taskfile
-	   is not required. */
+	   or interrupt-driven no-data commands. */
 	if ((pp->flags & NV_ADMA_ATAPI_SETUP_COMPLETE) ||
-	   (qc->tf.flags & ATA_TFLAG_POLLING) ||
-	   (qc->flags & ATA_QCFLAG_RESULT_TF))
+	   (qc->tf.flags & ATA_TFLAG_POLLING))
 		return 1;
 
 	if ((qc->flags & ATA_QCFLAG_DMAMAP) ||
@@ -1381,6 +1381,8 @@ static void nv_adma_qc_prep(struct ata_queued_cmd *qc)
 		       NV_CPB_CTL_IEN;
 
 	if (nv_adma_use_reg_mode(qc)) {
+		BUG_ON(!(pp->flags & NV_ADMA_ATAPI_SETUP_COMPLETE) &&
+			(qc->flags & ATA_QCFLAG_DMAMAP));
 		nv_adma_register_mode(qc->ap);
 		ata_qc_prep(qc);
 		return;
@@ -1425,9 +1427,21 @@ static unsigned int nv_adma_qc_issue(struct ata_queued_cmd *qc)
 
 	VPRINTK("ENTER\n");
 
+	/* We can't handle result taskfile with NCQ commands, since
+	   retrieving the taskfile switches us out of ADMA mode and would abort
+	   existing commands. */
+	if (unlikely(qc->tf.protocol == ATA_PROT_NCQ &&
+		     (qc->flags & ATA_QCFLAG_RESULT_TF))) {
+		ata_dev_printk(qc->dev, KERN_ERR,
+			"NCQ w/ RESULT_TF not allowed\n");
+		return AC_ERR_SYSTEM;
+	}
+
 	if (nv_adma_use_reg_mode(qc)) {
 		/* use ATA register mode */
 		VPRINTK("using ATA register mode: 0x%lx\n", qc->flags);
+		BUG_ON(!(pp->flags & NV_ADMA_ATAPI_SETUP_COMPLETE) &&
+			(qc->flags & ATA_QCFLAG_DMAMAP));
 		nv_adma_register_mode(qc->ap);
 		return ata_qc_issue_prot(qc);
 	} else

             reply	other threads:[~2007-12-04 20:10 UTC|newest]

Thread overview: 263+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-04 20:10 Jeff Garzik [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-04-08 20:30 Jeff Garzik
2013-01-21 19:48 Jeff Garzik
2013-01-22 18:04 ` Linus Torvalds
2012-11-17  4:39 Jeff Garzik
2012-08-25 14:26 Jeff Garzik
2012-05-03 18:27 Jeff Garzik
2012-05-03 18:31 ` Sergei Shtylyov
2012-05-03 18:38   ` Jeff Garzik
2012-05-04 11:04     ` Sergei Shtylyov
2012-05-04 21:04   ` Calvin Walton
2012-04-18 18:46 Jeff Garzik
2012-04-18 19:34 ` Josh Boyer
2012-04-18 19:45   ` Jeff Garzik
2011-11-24  1:23 Jeff Garzik
2011-11-24  1:32 ` Linus Torvalds
2011-08-19  4:45 Jeff Garzik
2011-06-23 20:52 Jeff Garzik
2010-12-24 18:37 Jeff Garzik
2010-11-12 22:30 Jeff Garzik
2010-09-10  2:41 Jeff Garzik
2010-08-25 23:32 Jeff Garzik
2010-07-01 20:20 Jeff Garzik
2010-06-10 20:09 Jeff Garzik
2010-06-07 20:07 Jeff Garzik
2010-05-05 18:54 Jeff Garzik
2010-04-23  2:17 Jeff Garzik
2010-04-06 15:22 Jeff Garzik
2010-03-23 13:42 Jeff Garzik
2010-03-23 18:06 ` Pavel Roskin
2010-03-25 16:21   ` Tejun Heo
2010-03-26 20:17     ` Pavel Roskin
2010-03-26 21:59       ` Pavel Roskin
2010-03-17 20:04 Jeff Garzik
2010-03-17 22:22 ` Marc Dionne
2010-02-05  1:29 Jeff Garzik
2010-01-12 19:36 Jeff Garzik
2009-12-20 20:45 Jeff Garzik
2009-10-16 10:26 Jeff Garzik
2009-08-12 10:35 Jeff Garzik
2009-07-29  2:02 Jeff Garzik
2009-07-15  3:09 Jeff Garzik
2009-06-05 18:46 Jeff Garzik
2009-06-05 20:16 ` Alan Cox
2009-06-05 21:15   ` Jeff Garzik
2009-05-11 18:37 Jeff Garzik
2009-04-17 23:07 Jeff Garzik
2009-04-16 19:39 Jeff Garzik
2009-04-16 20:28 ` Mark Lord
2009-04-13  9:27 Jeff Garzik
2009-03-13 19:03 Jeff Garzik
2009-03-05 12:34 Jeff Garzik
2009-02-25 20:36 Jeff Garzik
2009-02-17 21:25 Jeff Garzik
2009-01-27  7:30 Jeff Garzik
2009-01-27 15:50 ` Linus Torvalds
2009-01-27 18:37   ` Jeff Garzik
2009-01-27 19:02     ` Linus Torvalds
2009-01-27 23:04       ` Tejun Heo
2009-01-16 15:27 Jeff Garzik
2009-01-16 17:31 ` Andrew Morton
2009-01-16 18:21   ` Alan Cox
2009-01-16 18:45   ` Sergei Shtylyov
2009-01-16 18:49   ` Grant Grundler
2009-01-16 19:21   ` David Daney
2009-01-16 23:13     ` David Daney
2009-01-13 15:39 Jeff Garzik
2008-12-16 11:05 Jeff Garzik
2008-12-09  5:51 Jeff Garzik
     [not found] ` <200812091825.mB9IPRwq027199@lxorguk.ukuu.org.uk>
2008-12-09 18:28   ` Alan Cox
2008-12-01 19:06 Jeff Garzik
2008-11-11  8:06 Jeff Garzik
2008-11-04  6:20 Jeff Garzik
2008-10-31  5:49 Jeff Garzik
2008-10-31 13:20 ` Greg Freemyer
2008-11-02 13:21   ` Jeff Garzik
2008-11-02 20:18     ` Greg Freemyer
2008-11-02 23:42       ` Mark Lord
2008-10-23  0:48 Jeff Garzik
2008-09-13 20:59 Jeff Garzik
2008-06-19  0:59 Jeff Garzik
2008-06-13  7:03 Jeff Garzik
2008-06-04 10:45 Jeff Garzik
2008-05-30 22:13 Jeff Garzik
2008-04-29 22:09 Jeff Garzik
2008-04-25  5:36 Jeff Garzik
2008-04-12  5:28 Jeff Garzik
2008-04-09  7:04 Jeff Garzik
2008-04-04  8:23 Jeff Garzik
2008-03-29 20:09 Jeff Garzik
2008-03-25  2:50 Jeff Garzik
2008-03-17 12:35 Jeff Garzik
2008-03-17 18:29 ` Ingo Molnar
2008-03-17 18:31   ` Ingo Molnar
2008-03-11  1:23 Jeff Garzik
2008-03-05 12:57 Jeff Garzik
2008-02-24  5:35 Jeff Garzik
2008-02-24 17:21 ` Bartlomiej Zolnierkiewicz
2008-02-24 17:07   ` Alan Cox
2008-02-24 17:40     ` Bartlomiej Zolnierkiewicz
2008-02-20 17:25 Jeff Garzik
2008-02-15 21:20 Jeff Garzik
2008-02-11 19:51 Jeff Garzik
2008-01-15 21:42 Jeff Garzik
2008-01-15  3:44 Jeff Garzik
2008-01-10 22:43 Jeff Garzik
2007-12-18  2:00 Jeff Garzik
2007-12-07 20:34 Jeff Garzik
2007-12-07 21:27 ` Frans Pop
2007-12-01 23:35 Jeff Garzik
2007-11-26 16:16 Jeff Garzik
2007-11-19  4:36 Tejun Heo
2007-11-21  2:26 ` Jeff Garzik
2007-11-10  9:24 Jeff Garzik
2007-11-06  0:03 Jeff Garzik
2007-11-03 18:13 Jeff Garzik
2007-10-31  9:38 Mikael Pettersson
2007-10-31  9:40 ` Jeff Garzik
2007-10-30 18:45 Jeff Garzik
2007-10-30 18:54 ` Linus Torvalds
2007-10-30 19:12   ` Jeff Garzik
2007-10-30 19:31     ` Linus Torvalds
2007-10-30 19:46       ` Jan Engelhardt
2007-10-30 22:45         ` Junio C Hamano
2007-10-20  3:08 Jeff Garzik
2007-10-18  1:08 Jeff Garzik
2007-10-03 18:51 Jeff Garzik
2007-09-26  4:43 Jeff Garzik
2007-09-20 20:15 Jeff Garzik
2007-09-11  2:15 Jeff Garzik
2007-08-31  9:02 Jeff Garzik
2007-08-23 10:08 Jeff Garzik
2007-08-15  9:44 Jeff Garzik
2007-08-08  1:07 Jeff Garzik
2007-08-01 16:19 Jeff Garzik
2007-07-24 20:56 Jeff Garzik
2007-07-03 15:52 Jeff Garzik
2007-07-03 16:07 ` Alan Cox
2007-07-03 16:21   ` Linus Torvalds
2007-07-03 16:34     ` Alan Cox
2007-07-03 16:42       ` Linus Torvalds
2007-07-03 17:21         ` Alan Cox
2007-07-04 14:11           ` David Woodhouse
2007-07-02 14:52 Jeff Garzik
2007-06-28 14:29 Mikael Pettersson
2007-06-27  7:35 Jeff Garzik
2007-06-27  7:38 ` Andrew Morton
2007-06-27  7:47   ` Jeff Garzik
2007-06-27 15:48     ` Linus Torvalds
2007-06-21  0:06 Jeff Garzik
2007-06-10  3:31 Jeff Garzik
2007-05-26  0:06 Mikael Pettersson
2007-05-26  0:15 ` Jeff Garzik
2007-05-25 22:03 Jeff Garzik
2007-05-25  0:41 Jeff Garzik
2007-05-18  1:38 Jeff Garzik
2007-05-16  5:36 Jeff Garzik
2007-04-04  6:39 Jeff Garzik
2007-03-28  7:32 Jeff Garzik
2007-03-28  7:33 ` Jeff Garzik
2007-03-28 20:53   ` Linus Torvalds
2007-03-28 21:15     ` Andrew Morton
2007-03-28 21:33       ` Chuck Ebbert
2007-03-19 18:37 Jeff Garzik
2007-03-06  9:17 Jeff Garzik
2007-03-03  1:46 Jeff Garzik
2007-03-03 18:54 ` Paul Rolland
2007-03-03 19:33   ` Paul Rolland
2007-03-05  5:19   ` Tejun Heo
2007-03-05  9:52     ` Paul Rolland
2007-03-02  2:08 Jeff Garzik
2007-03-03 18:39 ` Paul Rolland
2007-03-05  5:13   ` Tejun Heo
2007-03-05  9:54     ` Paul Rolland
2007-03-05 15:45       ` Tejun Heo
2007-03-06  7:37         ` Paul Rolland
2007-03-09 12:49           ` Tejun Heo
2007-03-11 11:35             ` Paul Rolland
2007-03-11 16:43               ` Linus Torvalds
2007-03-11 18:34                 ` Paul Rolland
2007-03-11 19:20                   ` Paul Rolland
2007-03-11 20:04                   ` Linus Torvalds
2007-03-11 22:25                     ` Paul Rolland
2007-03-12  0:59                       ` Linus Torvalds
2007-03-12  6:28                         ` Tejun Heo
2007-03-12  6:30                           ` Tejun Heo
2007-03-12  8:00                           ` Paul Rolland
2007-03-12  8:04                             ` Tejun Heo
2007-03-12  9:58                               ` Paul Rolland
2007-03-17 17:59                               ` Paul Rolland
2007-03-17 18:44                                 ` Alan Cox
2007-03-17 18:47                                 ` Paul Rolland
2007-03-17 18:56                                   ` Alan Cox
2007-03-17 19:29                                     ` Paul Rolland
2007-03-17 19:56                                       ` Alan Cox
2007-03-17 19:42                                 ` Tejun Heo
2007-03-17 19:47                                   ` Paul Rolland
2007-03-17 20:02                                     ` Tejun Heo
2007-03-17 20:08                                       ` Paul Rolland
2007-03-18  4:52                                         ` Tejun Heo
2007-03-18 10:09                                           ` Paul Rolland
2007-03-18 10:28                                             ` Tejun Heo
2007-03-18 10:33                                               ` Paul Rolland
2007-03-18 10:39                                                 ` Tejun Heo
2007-03-18 10:50                                                   ` Paul Rolland
2007-03-18 11:06                                                     ` Paul Rolland
2007-03-19  4:37                                                       ` Tejun Heo
2007-03-19  7:48                                                         ` Paul Rolland
2007-03-19  7:55                                                           ` Tejun Heo
2007-03-19 11:05                                                           ` Alan Cox
2007-03-12  7:56                         ` Paul Rolland
2007-03-17 17:56                         ` Paul Rolland
2007-02-02 16:58 Jeff Garzik
2007-02-02 17:13 ` Linus Torvalds
2007-02-02 17:19   ` Jeff Garzik
2007-02-02 19:02   ` Alan
2007-02-02 21:43   ` Andrew Morton
2007-02-02 22:41     ` Linus Torvalds
2007-02-03  0:05       ` alan
2007-02-03  0:58         ` Linus Torvalds
2007-02-07  7:11 ` Conke Hu
2007-01-30 14:27 Jeff Garzik
2007-01-25 23:58 Jeff Garzik
2007-01-24  7:19 Jeff Garzik
2007-01-22 18:55 Jeff Garzik
2006-12-20 21:00 Jeff Garzik
2006-12-20 21:19 ` Stephen Frost
2006-12-16 17:27 Jeff Garzik
2006-11-30 10:48 Jeff Garzik
2006-11-30 16:05 ` Renato S. Yamane
2006-11-30 16:54   ` Renato S. Yamane
2006-11-14 15:04 Jeff Garzik
2006-11-14 16:32 ` Mark Lord
2006-11-14 16:41   ` Jeff Garzik
2006-11-14 18:11     ` Mark Lord
2006-11-02  3:11 Jeff Garzik
2006-11-01  2:13 Jeff Garzik
2006-11-01 14:06 ` John Stoffel
2006-11-01 14:30   ` Alan Cox
2006-11-02  0:02     ` Andrew Morton
2006-11-02  1:06       ` Jeff Garzik
2006-11-02  8:00         ` Jens Axboe
2006-10-21 19:55 Jeff Garzik
2006-10-11  9:05 Jeff Garzik
2006-09-11 12:58 Jeff Garzik
2006-08-24  8:13 Jeff Garzik
2006-08-24  8:29 ` Greg KH
2006-08-24  8:56   ` Greg KH
2006-08-24  9:00   ` Jeff Garzik
2006-08-09  6:25 Jeff Garzik
2006-08-09 18:47 ` Greg KH
2006-08-09 22:45   ` Greg KH
2006-08-10 12:23     ` Jeff Garzik
2006-07-29  5:41 Jeff Garzik
2006-07-17 17:42 Jeff Garzik
2006-05-24  7:05 Jeff Garzik
2006-05-20  4:47 Jeff Garzik
2006-03-31 15:22 Jeff Garzik
2006-02-25 22:03 Jeff Garzik
2006-02-21  5:17 Jeff Garzik
2006-02-17 21:41 Jeff Garzik
2006-02-09 18:47 Jeff Garzik
2005-09-14 13:13 Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071204201007.GA20326@havoc.gtf.org \
    --to=jeff@garzik.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome