Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 99f5e971 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [PATCH] pata_via: Cable detect error
  [PATCH] Fix help text for CONFIG_ATA_PIIX
  [PATCH] initializer entry defined twice in pata_rz1000
  [PATCH] ata: fix platform_device_register_simple() error check
  [PATCH] ahci: do not mangle saved HOST_CAP while resetting controller
  [PATCH] libata: don't initialize sg in ata_exec_internal() if DMA_NONE (take #2)
  [libata] sata_svw: Disable ATAPI DMA on current boards (errata workaround)
  [libata] use kmap_atomic(KM_IRQ0) in SCSI simulator
  [PATCH] ata_piix: use piix_host_stop() in ich_pata_ops
  [PATCH] ata_piix: IDE mode SATA patch for Intel ICH9
parents a08727ba 5c9a7611
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -40,9 +40,9 @@ config ATA_PIIX
	tristate "Intel PIIX/ICH SATA support"
	depends on PCI
	help
	  This option enables support for ICH5/6/7/8 Serial ATA.
	  If PATA support was enabled previously, this enables
	  support for select Intel PIIX/ICH PATA host controllers.
	  This option enables support for ICH5/6/7/8 Serial ATA
	  and support for PATA on the Intel PIIX3/PIIX4/ICH series
	  PATA host controllers.

	  If unsure, say N.

+0 −2
Original line number Diff line number Diff line
@@ -645,8 +645,6 @@ static int ahci_reset_controller(void __iomem *mmio, struct pci_dev *pdev)
	u32 cap_save, impl_save, tmp;

	cap_save = readl(mmio + HOST_CAP);
	cap_save &= ( (1<<28) | (1<<17) );
	cap_save |= (1 << 27);
	impl_save = readl(mmio + HOST_PORTS_IMPL);

	/* global controller reset */
+17 −5
Original line number Diff line number Diff line
@@ -226,14 +226,26 @@ static const struct pci_device_id piix_pci_tbl[] = {
	{ 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci },
	/* 2801GBM/GHM (ICH7M, identical to ICH6M) */
	{ 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6m_sata_ahci },
	/* Enterprise Southbridge 2 (where's the datasheet?) */
	/* Enterprise Southbridge 2 (631xESB/632xESB) */
	{ 0x8086, 0x2680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci },
	/* SATA Controller 1 IDE (ICH8, no datasheet yet) */
	/* SATA Controller 1 IDE (ICH8) */
	{ 0x8086, 0x2820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
	/* SATA Controller 2 IDE (ICH8, ditto) */
	/* SATA Controller 2 IDE (ICH8) */
	{ 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
	/* Mobile SATA Controller IDE (ICH8M, ditto) */
	/* Mobile SATA Controller IDE (ICH8M) */
	{ 0x8086, 0x2828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
	/* SATA Controller IDE (ICH9) */
	{ 0x8086, 0x2920, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
	/* SATA Controller IDE (ICH9) */
	{ 0x8086, 0x2921, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
	/* SATA Controller IDE (ICH9) */
	{ 0x8086, 0x2926, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
	/* SATA Controller IDE (ICH9M) */
	{ 0x8086, 0x2928, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
	/* SATA Controller IDE (ICH9M) */
	{ 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 },

	{ }	/* terminate list */
};
@@ -330,7 +342,7 @@ static const struct ata_port_operations ich_pata_ops = {

	.port_start		= ata_port_start,
	.port_stop		= ata_port_stop,
	.host_stop		= ata_host_stop,
	.host_stop		= piix_host_stop,
};

static const struct ata_port_operations piix_sata_ops = {
+10 −4
Original line number Diff line number Diff line
@@ -1332,7 +1332,7 @@ unsigned ata_exec_internal_sg(struct ata_device *dev,
}

/**
 *	ata_exec_internal_sg - execute libata internal command
 *	ata_exec_internal - execute libata internal command
 *	@dev: Device to which the command is sent
 *	@tf: Taskfile registers for the command and the result
 *	@cdb: CDB for packet command
@@ -1353,11 +1353,17 @@ unsigned ata_exec_internal(struct ata_device *dev,
			   struct ata_taskfile *tf, const u8 *cdb,
			   int dma_dir, void *buf, unsigned int buflen)
{
	struct scatterlist sg;
	struct scatterlist *psg = NULL, sg;
	unsigned int n_elem = 0;

	if (dma_dir != DMA_NONE) {
		WARN_ON(!buf);
		sg_init_one(&sg, buf, buflen);
		psg = &sg;
		n_elem++;
	}

	return ata_exec_internal_sg(dev, tf, cdb, dma_dir, &sg, 1);
	return ata_exec_internal_sg(dev, tf, cdb, dma_dir, psg, n_elem);
}

/**
+2 −2
Original line number Diff line number Diff line
@@ -1539,7 +1539,7 @@ static unsigned int ata_scsi_rbuf_get(struct scsi_cmnd *cmd, u8 **buf_out)
		struct scatterlist *sg;

		sg = (struct scatterlist *) cmd->request_buffer;
		buf = kmap_atomic(sg->page, KM_USER0) + sg->offset;
		buf = kmap_atomic(sg->page, KM_IRQ0) + sg->offset;
		buflen = sg->length;
	} else {
		buf = cmd->request_buffer;
@@ -1567,7 +1567,7 @@ static inline void ata_scsi_rbuf_put(struct scsi_cmnd *cmd, u8 *buf)
		struct scatterlist *sg;

		sg = (struct scatterlist *) cmd->request_buffer;
		kunmap_atomic(buf - sg->offset, KM_USER0);
		kunmap_atomic(buf - sg->offset, KM_IRQ0);
	}
}

Loading