Commit b4eea67a authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  ahci: sis can't do PMP
  ata_piix: add TECRA M4 to broken suspend list
  LIBATA: Add HAVE_PATA_PLATFORM to select PATA_PLATFORM driver
  sata_mv: warn on PIO with multiple DRQs
  sata_mv: enable async_notify for 60x1 Rev.C0 and higher
  libata: don't check whether to use DMA or not for no data commands
  ahci: jmb361 has only one port
parents 1f6ef234 9a3b103c
Loading
Loading
Loading
Loading
+9 −1
Original line number Original line Diff line number Diff line
@@ -651,9 +651,17 @@ config PATA_WINBOND_VLB
	  Support for the Winbond W83759A controller on Vesa Local Bus
	  Support for the Winbond W83759A controller on Vesa Local Bus
	  systems.
	  systems.


config HAVE_PATA_PLATFORM
	bool
	help
	  This is an internal configuration node for any machine that
	  uses pata-platform driver to enable the relevant driver in the
	  configuration structure without having to submit endless patches
	  to update the PATA_PLATFORM entry.

config PATA_PLATFORM
config PATA_PLATFORM
	tristate "Generic platform device PATA support"
	tristate "Generic platform device PATA support"
	depends on EMBEDDED || ARCH_RPC || PPC
	depends on EMBEDDED || ARCH_RPC || PPC || HAVE_PATA_PLATFORM
	help
	help
	  This option enables support for generic directly connected ATA
	  This option enables support for generic directly connected ATA
	  devices commonly found on embedded systems.
	  devices commonly found on embedded systems.
+20 −3
Original line number Original line Diff line number Diff line
@@ -90,6 +90,7 @@ enum {
	board_ahci_mv		= 4,
	board_ahci_mv		= 4,
	board_ahci_sb700	= 5,
	board_ahci_sb700	= 5,
	board_ahci_mcp65	= 6,
	board_ahci_mcp65	= 6,
	board_ahci_nopmp	= 7,


	/* global controller registers */
	/* global controller registers */
	HOST_CAP		= 0x00, /* host capabilities */
	HOST_CAP		= 0x00, /* host capabilities */
@@ -401,6 +402,14 @@ static const struct ata_port_info ahci_port_info[] = {
		.udma_mask	= ATA_UDMA6,
		.udma_mask	= ATA_UDMA6,
		.port_ops	= &ahci_ops,
		.port_ops	= &ahci_ops,
	},
	},
	/* board_ahci_nopmp */
	{
		AHCI_HFLAGS	(AHCI_HFLAG_NO_PMP),
		.flags		= AHCI_FLAG_COMMON,
		.pio_mask	= 0x1f, /* pio0-4 */
		.udma_mask	= ATA_UDMA6,
		.port_ops	= &ahci_ops,
	},
};
};


static const struct pci_device_id ahci_pci_tbl[] = {
static const struct pci_device_id ahci_pci_tbl[] = {
@@ -525,9 +534,9 @@ static const struct pci_device_id ahci_pci_tbl[] = {
	{ PCI_VDEVICE(NVIDIA, 0x0bc7), board_ahci },		/* MCP7B */
	{ PCI_VDEVICE(NVIDIA, 0x0bc7), board_ahci },		/* MCP7B */


	/* SiS */
	/* SiS */
	{ PCI_VDEVICE(SI, 0x1184), board_ahci }, /* SiS 966 */
	{ PCI_VDEVICE(SI, 0x1184), board_ahci_nopmp },		/* SiS 966 */
	{ PCI_VDEVICE(SI, 0x1185), board_ahci }, /* SiS 966 */
	{ PCI_VDEVICE(SI, 0x1185), board_ahci_nopmp },		/* SiS 968 */
	{ PCI_VDEVICE(SI, 0x0186), board_ahci }, /* SiS 968 */
	{ PCI_VDEVICE(SI, 0x0186), board_ahci_nopmp },		/* SiS 968 */


	/* Marvell */
	/* Marvell */
	{ PCI_VDEVICE(MARVELL, 0x6145), board_ahci_mv },	/* 6145 */
	{ PCI_VDEVICE(MARVELL, 0x6145), board_ahci_mv },	/* 6145 */
@@ -653,6 +662,14 @@ static void ahci_save_initial_config(struct pci_dev *pdev,
		cap &= ~HOST_CAP_PMP;
		cap &= ~HOST_CAP_PMP;
	}
	}


	if (pdev->vendor == PCI_VENDOR_ID_JMICRON && pdev->device == 0x2361 &&
	    port_map != 1) {
		dev_printk(KERN_INFO, &pdev->dev,
			   "JMB361 has only one port, port_map 0x%x -> 0x%x\n",
			   port_map, 1);
		port_map = 1;
	}

	/*
	/*
	 * Temporary Marvell 6145 hack: PATA port presence
	 * Temporary Marvell 6145 hack: PATA port presence
	 * is asserted through the standard AHCI port
	 * is asserted through the standard AHCI port
+7 −0
Original line number Original line Diff line number Diff line
@@ -1042,6 +1042,13 @@ static int piix_broken_suspend(void)
				DMI_MATCH(DMI_PRODUCT_NAME, "Tecra M4"),
				DMI_MATCH(DMI_PRODUCT_NAME, "Tecra M4"),
			},
			},
		},
		},
		{
			.ident = "TECRA M4",
			.matches = {
				DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
				DMI_MATCH(DMI_PRODUCT_NAME, "TECRA M4"),
			},
		},
		{
		{
			.ident = "TECRA M5",
			.ident = "TECRA M5",
			.matches = {
			.matches = {
+2 −2
Original line number Original line Diff line number Diff line
@@ -4297,7 +4297,7 @@ void ata_sg_clean(struct ata_queued_cmd *qc)
}
}


/**
/**
 *	ata_check_atapi_dma - Check whether ATAPI DMA can be supported
 *	atapi_check_dma - Check whether ATAPI DMA can be supported
 *	@qc: Metadata associated with taskfile to check
 *	@qc: Metadata associated with taskfile to check
 *
 *
 *	Allow low-level driver to filter ATA PACKET commands, returning
 *	Allow low-level driver to filter ATA PACKET commands, returning
@@ -4310,7 +4310,7 @@ void ata_sg_clean(struct ata_queued_cmd *qc)
 *	RETURNS: 0 when ATAPI DMA can be used
 *	RETURNS: 0 when ATAPI DMA can be used
 *               nonzero otherwise
 *               nonzero otherwise
 */
 */
int ata_check_atapi_dma(struct ata_queued_cmd *qc)
int atapi_check_dma(struct ata_queued_cmd *qc)
{
{
	struct ata_port *ap = qc->ap;
	struct ata_port *ap = qc->ap;


+7 −9
Original line number Original line Diff line number Diff line
@@ -2343,8 +2343,8 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc)
{
{
	struct scsi_cmnd *scmd = qc->scsicmd;
	struct scsi_cmnd *scmd = qc->scsicmd;
	struct ata_device *dev = qc->dev;
	struct ata_device *dev = qc->dev;
	int using_pio = (dev->flags & ATA_DFLAG_PIO);
	int nodata = (scmd->sc_data_direction == DMA_NONE);
	int nodata = (scmd->sc_data_direction == DMA_NONE);
	int using_pio = !nodata && (dev->flags & ATA_DFLAG_PIO);
	unsigned int nbytes;
	unsigned int nbytes;


	memset(qc->cdb, 0, dev->cdb_len);
	memset(qc->cdb, 0, dev->cdb_len);
@@ -2362,7 +2362,7 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc)
	ata_qc_set_pc_nbytes(qc);
	ata_qc_set_pc_nbytes(qc);


	/* check whether ATAPI DMA is safe */
	/* check whether ATAPI DMA is safe */
	if (!using_pio && ata_check_atapi_dma(qc))
	if (!nodata && !using_pio && atapi_check_dma(qc))
		using_pio = 1;
		using_pio = 1;


	/* Some controller variants snoop this value for Packet
	/* Some controller variants snoop this value for Packet
@@ -2402,13 +2402,11 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc)
	qc->tf.lbam = (nbytes & 0xFF);
	qc->tf.lbam = (nbytes & 0xFF);
	qc->tf.lbah = (nbytes >> 8);
	qc->tf.lbah = (nbytes >> 8);


	if (using_pio || nodata) {
		/* no data, or PIO data xfer */
	if (nodata)
	if (nodata)
		qc->tf.protocol = ATAPI_PROT_NODATA;
		qc->tf.protocol = ATAPI_PROT_NODATA;
		else
	else if (using_pio)
		qc->tf.protocol = ATAPI_PROT_PIO;
		qc->tf.protocol = ATAPI_PROT_PIO;
	} else {
	else {
		/* DMA data xfer */
		/* DMA data xfer */
		qc->tf.protocol = ATAPI_PROT_DMA;
		qc->tf.protocol = ATAPI_PROT_DMA;
		qc->tf.feature |= ATAPI_PKT_DMA;
		qc->tf.feature |= ATAPI_PKT_DMA;
Loading