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

Commit e669e817 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (60 commits)
  ide: small whitespace fixes
  ide: ide-cd_ioctl.c fix sparse integer as NULL pointer warnings
  ide: ide-cd.c fix sparse endianness warnings
  ide-cd: convert to using the new atapi_flags
  ide: remove unused PC_FLAG_DRQ_INTERRUPT
  ide-scsi: convert to using the new atapi_flags
  ide-tape: convert to using the new atapi_flags
  ide-floppy: convert to using the new atapi_flags (take 2)
  ide: add per-device flags
  ide: use rq->cmd instead of pc->c in atapi common code
  ide-scsi: pass packet command in rq->cmd
  ide-tape: pass packet command in rq->cmd
  ide-tape: make room for packet command ids in rq->cmd
  ide-floppy: pass packet command in rq->cmd
  ide: remove pc->callback member from ide_atapi_pc
  ide-scsi: use drive->pc_callback instead of pc->callback
  ide-tape: use drive->pc_callback instead of pc->callback
  ide-floppy: use drive->pc_callback instead of pc->callback
  ide: push pc callback pointer into the ide_drive_t structure
  drivers/ide/ide-tape.c: remove double kfree
  ...
parents 876a4256 fc410698
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -510,6 +510,7 @@ config BLK_DEV_TRIFLEX

config BLK_DEV_CY82C693
	tristate "CY82C693 chipset support"
	depends on ALPHA
	select IDE_TIMINGS
	select BLK_DEV_IDEDMA_PCI
	help
@@ -548,6 +549,7 @@ config BLK_DEV_CS5535

config BLK_DEV_HPT34X
	tristate "HPT34X chipset support"
	depends on BROKEN
	select BLK_DEV_IDEDMA_PCI
	help
	  This driver adds up to 4 more EIDE devices sharing a single
+31 −40
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ struct icside_state {
	void __iomem *ioc_base;
	unsigned int sel;
	unsigned int type;
	ide_hwif_t *hwif[2];
	struct ide_host *host;
};

#define ICS_TYPE_A3IN	0
@@ -375,12 +375,14 @@ static int icside_dma_test_irq(ide_drive_t *drive)

static void icside_dma_timeout(ide_drive_t *drive)
{
	ide_hwif_t *hwif = drive->hwif;

	printk(KERN_ERR "%s: DMA timeout occurred: ", drive->name);

	if (icside_dma_test_irq(drive))
		return;

	ide_dump_status(drive, "DMA timeout", ide_read_status(drive));
	ide_dump_status(drive, "DMA timeout", hwif->tp_ops->read_status(hwif));

	icside_dma_end(drive);
}
@@ -440,10 +442,10 @@ static void icside_setup_ports(hw_regs_t *hw, void __iomem *base,
static int __init
icside_register_v5(struct icside_state *state, struct expansion_card *ec)
{
	ide_hwif_t *hwif;
	void __iomem *base;
	u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
	hw_regs_t hw;
	struct ide_host *host;
	hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL };
	int ret;

	base = ecardm_iomap(ec, ECARD_RES_MEMC, 0, 0);
	if (!base)
@@ -463,22 +465,23 @@ icside_register_v5(struct icside_state *state, struct expansion_card *ec)

	icside_setup_ports(&hw, base, &icside_cardinfo_v5, ec);

	hwif = ide_find_port();
	if (!hwif)
	host = ide_host_alloc(NULL, hws);
	if (host == NULL)
		return -ENODEV;

	ide_init_port_hw(hwif, &hw);
	default_hwif_mmiops(hwif);

	state->hwif[0] = hwif;
	state->host = host;

	ecard_set_drvdata(ec, state);

	idx[0] = hwif->index;

	ide_device_add(idx, NULL);
	ret = ide_host_register(host, NULL, hws);
	if (ret)
		goto err_free;

	return 0;
err_free:
	ide_host_free(host);
	ecard_set_drvdata(ec, NULL);
	return ret;
}

static const struct ide_port_info icside_v6_port_info __initdata = {
@@ -493,13 +496,12 @@ static const struct ide_port_info icside_v6_port_info __initdata = {
static int __init
icside_register_v6(struct icside_state *state, struct expansion_card *ec)
{
	ide_hwif_t *hwif, *mate;
	void __iomem *ioc_base, *easi_base;
	struct ide_host *host;
	unsigned int sel = 0;
	int ret;
	u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
	hw_regs_t hw[2], *hws[] = { &hw[0], NULL, NULL, NULL };
	struct ide_port_info d = icside_v6_port_info;
	hw_regs_t hw[2];

	ioc_base = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, 0);
	if (!ioc_base) {
@@ -538,28 +540,11 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec)
	icside_setup_ports(&hw[0], easi_base, &icside_cardinfo_v6_1, ec);
	icside_setup_ports(&hw[1], easi_base, &icside_cardinfo_v6_2, ec);

	/*
	 * Find and register the interfaces.
	 */
	hwif = ide_find_port();
	if (hwif == NULL)
	host = ide_host_alloc(&d, hws);
	if (host == NULL)
		return -ENODEV;

	ide_init_port_hw(hwif, &hw[0]);
	default_hwif_mmiops(hwif);

	idx[0] = hwif->index;

	mate = ide_find_port();
	if (mate) {
		ide_init_port_hw(mate, &hw[1]);
		default_hwif_mmiops(mate);

		idx[1] = mate->index;
	}

	state->hwif[0]    = hwif;
	state->hwif[1]    = mate;
	state->host = host;

	ecard_set_drvdata(ec, state);

@@ -569,10 +554,16 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec)
		d.dma_ops = NULL;
	}

	ide_device_add(idx, &d);
	ret = ide_host_register(host, NULL, hws);
	if (ret)
		goto err_free;

	return 0;

err_free:
	ide_host_free(host);
	if (d.dma_ops)
		free_dma(ec->dma);
	ecard_set_drvdata(ec, NULL);
out:
	return ret;
}
+2 −12
Original line number Diff line number Diff line
@@ -28,10 +28,8 @@

static int __init ide_arm_init(void)
{
	ide_hwif_t *hwif;
	hw_regs_t hw;
	unsigned long base = IDE_ARM_IO, ctl = IDE_ARM_IO + 0x206;
	u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
	hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL };

	if (!request_region(base, 8, DRV_NAME)) {
		printk(KERN_ERR "%s: I/O resource 0x%lX-0x%lX not free.\n",
@@ -51,15 +49,7 @@ static int __init ide_arm_init(void)
	hw.irq = IDE_ARM_IRQ;
	hw.chipset = ide_generic;

	hwif = ide_find_port();
	if (hwif) {
		ide_init_port_hw(hwif, &hw);
		idx[0] = hwif->index;

		ide_device_add(idx, NULL);
	}

	return 0;
	return ide_host_add(NULL, hws, NULL);
}

module_init(ide_arm_init);
+9 −21
Original line number Diff line number Diff line
@@ -316,15 +316,14 @@ static u8 __devinit palm_bk3710_cable_detect(ide_hwif_t *hwif)
static int __devinit palm_bk3710_init_dma(ide_hwif_t *hwif,
					  const struct ide_port_info *d)
{
	unsigned long base =
		hwif->io_ports.data_addr - IDE_PALM_ATA_PRI_REG_OFFSET;

	printk(KERN_INFO "    %s: MMIO-DMA\n", hwif->name);

	if (ide_allocate_dma_engine(hwif))
		return -1;

	ide_setup_dma(hwif, base);
	hwif->dma_base = hwif->io_ports.data_addr - IDE_PALM_ATA_PRI_REG_OFFSET;

	hwif->dma_ops = &sff_dma_ops;

	return 0;
}
@@ -348,11 +347,10 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev)
{
	struct clk *clk;
	struct resource *mem, *irq;
	ide_hwif_t *hwif;
	struct ide_host *host;
	unsigned long base, rate;
	int i;
	hw_regs_t hw;
	u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
	int i, rc;
	hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL };

	clk = clk_get(NULL, "IDECLK");
	if (IS_ERR(clk))
@@ -394,24 +392,14 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev)
	hw.irq = irq->start;
	hw.chipset = ide_palm3710;

	hwif = ide_find_port();
	if (hwif == NULL)
	rc = ide_host_add(&palm_bk3710_port_info, hws, NULL);
	if (rc)
		goto out;

	i = hwif->index;

	ide_init_port_hw(hwif, &hw);

	default_hwif_mmiops(hwif);

	idx[0] = i;

	ide_device_add(idx, &palm_bk3710_port_info);

	return 0;
out:
	printk(KERN_WARNING "Palm Chip BK3710 IDE Register Fail\n");
	return -ENODEV;
	return rc;
}

/* work with hotplug and coldplug */
+7 −17
Original line number Diff line number Diff line
@@ -32,11 +32,10 @@ static void rapide_setup_ports(hw_regs_t *hw, void __iomem *base,
static int __devinit
rapide_probe(struct expansion_card *ec, const struct ecard_id *id)
{
	ide_hwif_t *hwif;
	void __iomem *base;
	struct ide_host *host;
	int ret;
	u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
	hw_regs_t hw;
	hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL };

	ret = ecard_request_resources(ec);
	if (ret)
@@ -53,20 +52,11 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id)
	hw.chipset = ide_generic;
	hw.dev = &ec->dev;

	hwif = ide_find_port();
	if (hwif == NULL) {
		ret = -ENOENT;
	ret = ide_host_add(&rapide_port_info, hws, &host);
	if (ret)
		goto release;
	}

	ide_init_port_hw(hwif, &hw);
	default_hwif_mmiops(hwif);

	idx[0] = hwif->index;

	ide_device_add(idx, &rapide_port_info);

	ecard_set_drvdata(ec, hwif);
	ecard_set_drvdata(ec, host);
	goto out;

 release:
@@ -77,11 +67,11 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id)

static void __devexit rapide_remove(struct expansion_card *ec)
{
	ide_hwif_t *hwif = ecard_get_drvdata(ec);
	struct ide_host *host = ecard_get_drvdata(ec);

	ecard_set_drvdata(ec, NULL);

	ide_unregister(hwif);
	ide_host_remove(host);

	ecard_release_resources(ec);
}
Loading