Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147912
b: refs/heads/master
c: 6250d3a
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Jun 7, 2009
1 parent 9508414 commit 04c13ee
Show file tree
Hide file tree
Showing 45 changed files with 544 additions and 995 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 075affcbe01d4d7cefcd0e30a98df1253bcf8d92
refs/heads/master: 6250d3af2a1036fb356264442211a4246c7d64c7
10 changes: 7 additions & 3 deletions trunk/block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1739,10 +1739,14 @@ static int __end_that_request_first(struct request *req, int error,
trace_block_rq_complete(req->q, req);

/*
* for a REQ_TYPE_BLOCK_PC request, we want to carry any eventual
* sense key with us all the way through
* For fs requests, rq is just carrier of independent bio's
* and each partial completion should be handled separately.
* Reset per-request error on each partial completion.
*
* TODO: tj: This is too subtle. It would be better to let
* low level drivers do what they see fit.
*/
if (!blk_pc_request(req))
if (blk_fs_request(req))
req->errors = 0;

if (error && (blk_fs_request(req) && !(req->cmd_flags & REQ_QUIET))) {
Expand Down
10 changes: 3 additions & 7 deletions trunk/drivers/ide/alim15x3.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,27 +402,23 @@ static u8 ali_cable_detect(ide_hwif_t *hwif)
return cbl;
}

#if !defined(CONFIG_SPARC64) && !defined(CONFIG_PPC)
#ifndef CONFIG_SPARC64
/**
* init_hwif_ali15x3 - Initialize the ALI IDE x86 stuff
* @hwif: interface to configure
*
* Obtain the IRQ tables for an ALi based IDE solution on the PC
* class platforms. This part of the code isn't applicable to the
* Sparc and PowerPC systems.
* Sparc systems.
*/

static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif)
{
struct pci_dev *dev = to_pci_dev(hwif->dev);
u8 ideic, inmir;
s8 irq_routing_table[] = { -1, 9, 3, 10, 4, 5, 7, 6,
1, 11, 0, 12, 0, 14, 0, 15 };
int irq = -1;

if (dev->device == PCI_DEVICE_ID_AL_M5229)
hwif->irq = hwif->channel ? 15 : 14;

if (isa_dev) {
/*
* read IDE interface control
Expand Down Expand Up @@ -455,7 +451,7 @@ static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif)
}
#else
#define init_hwif_ali15x3 NULL
#endif /* !defined(CONFIG_SPARC64) && !defined(CONFIG_PPC) */
#endif /* CONFIG_SPARC64 */

/**
* init_dma_ali15x3 - set up DMA on ALi15x3
Expand Down
7 changes: 3 additions & 4 deletions trunk/drivers/ide/at91_ide.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ static const struct ide_port_info at91_ide_port_info __initdata = {
.host_flags = IDE_HFLAG_MMIO | IDE_HFLAG_NO_DMA | IDE_HFLAG_SINGLE |
IDE_HFLAG_NO_IO_32BIT | IDE_HFLAG_UNMASK_IRQS,
.pio_mask = ATA_PIO6,
.chipset = ide_generic,
};

/*
Expand Down Expand Up @@ -246,8 +247,7 @@ irqreturn_t at91_irq_handler(int irq, void *dev_id)
static int __init at91_ide_probe(struct platform_device *pdev)
{
int ret;
hw_regs_t hw;
hw_regs_t *hws[] = { &hw, NULL, NULL, NULL };
struct ide_hw hw, *hws[] = { &hw };
struct ide_host *host;
struct resource *res;
unsigned long tf_base = 0, ctl_base = 0;
Expand Down Expand Up @@ -304,10 +304,9 @@ static int __init at91_ide_probe(struct platform_device *pdev)
ide_std_init_ports(&hw, tf_base, ctl_base + 6);

hw.irq = board->irq_pin;
hw.chipset = ide_generic;
hw.dev = &pdev->dev;

host = ide_host_alloc(&at91_ide_port_info, hws);
host = ide_host_alloc(&at91_ide_port_info, hws, 1);
if (!host) {
perr("failed to allocate ide host\n");
return -ENOMEM;
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/ide/au1xxx-ide.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ static int auide_ddma_init(ide_hwif_t *hwif, const struct ide_port_info *d)
}
#endif

static void auide_setup_ports(hw_regs_t *hw, _auide_hwif *ahwif)
static void auide_setup_ports(struct ide_hw *hw, _auide_hwif *ahwif)
{
int i;
unsigned long *ata_regs = hw->io_ports_array;
Expand Down Expand Up @@ -499,6 +499,7 @@ static const struct ide_port_info au1xxx_port_info = {
#ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
.mwdma_mask = ATA_MWDMA2,
#endif
.chipset = ide_au1xxx,
};

static int au_ide_probe(struct platform_device *dev)
Expand All @@ -507,7 +508,7 @@ static int au_ide_probe(struct platform_device *dev)
struct resource *res;
struct ide_host *host;
int ret = 0;
hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL };
struct ide_hw hw, *hws[] = { &hw };

#if defined(CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA)
char *mode = "MWDMA2";
Expand Down Expand Up @@ -548,9 +549,8 @@ static int au_ide_probe(struct platform_device *dev)
auide_setup_ports(&hw, ahwif);
hw.irq = ahwif->irq;
hw.dev = &dev->dev;
hw.chipset = ide_au1xxx;

ret = ide_host_add(&au1xxx_port_info, hws, &host);
ret = ide_host_add(&au1xxx_port_info, hws, 1, &host);
if (ret)
goto out;

Expand Down
9 changes: 4 additions & 5 deletions trunk/drivers/ide/buddha.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ static int xsurf_ack_intr(ide_hwif_t *hwif)
return 1;
}

static void __init buddha_setup_ports(hw_regs_t *hw, unsigned long base,
static void __init buddha_setup_ports(struct ide_hw *hw, unsigned long base,
unsigned long ctl, unsigned long irq_port,
ide_ack_intr_t *ack_intr)
{
Expand All @@ -139,13 +139,12 @@ static void __init buddha_setup_ports(hw_regs_t *hw, unsigned long base,

hw->irq = IRQ_AMIGA_PORTS;
hw->ack_intr = ack_intr;

hw->chipset = ide_generic;
}

static const struct ide_port_info buddha_port_info = {
.host_flags = IDE_HFLAG_MMIO | IDE_HFLAG_NO_DMA,
.irq_flags = IRQF_SHARED,
.chipset = ide_generic,
};

/*
Expand All @@ -161,7 +160,7 @@ static int __init buddha_init(void)

while ((z = zorro_find_device(ZORRO_WILDCARD, z))) {
unsigned long board;
hw_regs_t hw[MAX_NUM_HWIFS], *hws[] = { NULL, NULL, NULL, NULL };
struct ide_hw hw[MAX_NUM_HWIFS], *hws[MAX_NUM_HWIFS];

if (z->id == ZORRO_PROD_INDIVIDUAL_COMPUTERS_BUDDHA) {
buddha_num_hwifs = BUDDHA_NUM_HWIFS;
Expand Down Expand Up @@ -225,7 +224,7 @@ static int __init buddha_init(void)
hws[i] = &hw[i];
}

ide_host_add(&buddha_port_info, hws, NULL);
ide_host_add(&buddha_port_info, hws, i, NULL);
}

return 0;
Expand Down
7 changes: 3 additions & 4 deletions trunk/drivers/ide/cmd640.c
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ static int __init cmd640x_init(void)
int second_port_cmd640 = 0, rc;
const char *bus_type, *port2;
u8 b, cfr;
hw_regs_t hw[2], *hws[] = { NULL, NULL, NULL, NULL };
struct ide_hw hw[2], *hws[2];

if (cmd640_vlb && probe_for_cmd640_vlb()) {
bus_type = "VLB";
Expand Down Expand Up @@ -762,11 +762,9 @@ static int __init cmd640x_init(void)

ide_std_init_ports(&hw[0], 0x1f0, 0x3f6);
hw[0].irq = 14;
hw[0].chipset = ide_cmd640;

ide_std_init_ports(&hw[1], 0x170, 0x376);
hw[1].irq = 15;
hw[1].chipset = ide_cmd640;

printk(KERN_INFO "cmd640: buggy cmd640%c interface on %s, config=0x%02x"
"\n", 'a' + cmd640_chip_version - 1, bus_type, cfr);
Expand Down Expand Up @@ -824,7 +822,8 @@ static int __init cmd640x_init(void)
cmd640_dump_regs();
#endif

return ide_host_add(&cmd640_port_info, hws, NULL);
return ide_host_add(&cmd640_port_info, hws, second_port_cmd640 ? 2 : 1,
NULL);
}

module_param_named(probe_vlb, cmd640_vlb, bool, 0);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/ide/cs5520.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static const struct ide_port_info cyrix_chipset __devinitdata = {
static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
const struct ide_port_info *d = &cyrix_chipset;
hw_regs_t hw[4], *hws[] = { NULL, NULL, NULL, NULL };
struct ide_hw hw[2], *hws[] = { NULL, NULL };

ide_setup_pci_noise(dev, d);

Expand All @@ -136,7 +136,7 @@ static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_devic
ide_pci_setup_ports(dev, d, &hw[0], &hws[0]);
hw[0].irq = 14;

return ide_host_add(d, hws, NULL);
return ide_host_add(d, hws, 2, NULL);
}

static const struct pci_device_id cs5520_pci_tbl[] = {
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/ide/delkin_cb.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ static const struct ide_port_info delkin_cb_port_info = {
IDE_HFLAG_NO_DMA,
.irq_flags = IRQF_SHARED,
.init_chipset = delkin_cb_init_chipset,
.chipset = ide_pci,
};

static int __devinit
Expand All @@ -76,7 +77,7 @@ delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id)
struct ide_host *host;
unsigned long base;
int rc;
hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL };
struct ide_hw hw, *hws[] = { &hw };

rc = pci_enable_device(dev);
if (rc) {
Expand All @@ -97,9 +98,8 @@ delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id)
ide_std_init_ports(&hw, base + 0x10, base + 0x1e);
hw.irq = dev->irq;
hw.dev = &dev->dev;
hw.chipset = ide_pci; /* this enables IRQ sharing */

rc = ide_host_add(&delkin_cb_port_info, hws, &host);
rc = ide_host_add(&delkin_cb_port_info, hws, 1, &host);
if (rc)
goto out_disable;

Expand Down
9 changes: 4 additions & 5 deletions trunk/drivers/ide/falconide.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,10 @@ static const struct ide_port_info falconide_port_info = {
.host_flags = IDE_HFLAG_MMIO | IDE_HFLAG_SERIALIZE |
IDE_HFLAG_NO_DMA,
.irq_flags = IRQF_SHARED,
.chipset = ide_generic,
};

static void __init falconide_setup_ports(hw_regs_t *hw)
static void __init falconide_setup_ports(struct ide_hw *hw)
{
int i;

Expand All @@ -128,8 +129,6 @@ static void __init falconide_setup_ports(hw_regs_t *hw)

hw->irq = IRQ_MFP_IDE;
hw->ack_intr = NULL;

hw->chipset = ide_generic;
}

/*
Expand All @@ -139,7 +138,7 @@ static void __init falconide_setup_ports(hw_regs_t *hw)
static int __init falconide_init(void)
{
struct ide_host *host;
hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL };
struct ide_hw hw, *hws[] = { &hw };
int rc;

if (!MACH_IS_ATARI || !ATARIHW_PRESENT(IDE))
Expand All @@ -154,7 +153,7 @@ static int __init falconide_init(void)

falconide_setup_ports(&hw);

host = ide_host_alloc(&falconide_port_info, hws);
host = ide_host_alloc(&falconide_port_info, hws, 1);
if (host == NULL) {
rc = -ENOMEM;
goto err;
Expand Down
9 changes: 4 additions & 5 deletions trunk/drivers/ide/gayle.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ static int gayle_ack_intr_a1200(ide_hwif_t *hwif)
return 1;
}

static void __init gayle_setup_ports(hw_regs_t *hw, unsigned long base,
static void __init gayle_setup_ports(struct ide_hw *hw, unsigned long base,
unsigned long ctl, unsigned long irq_port,
ide_ack_intr_t *ack_intr)
{
Expand All @@ -106,14 +106,13 @@ static void __init gayle_setup_ports(hw_regs_t *hw, unsigned long base,

hw->irq = IRQ_AMIGA_PORTS;
hw->ack_intr = ack_intr;

hw->chipset = ide_generic;
}

static const struct ide_port_info gayle_port_info = {
.host_flags = IDE_HFLAG_MMIO | IDE_HFLAG_SERIALIZE |
IDE_HFLAG_NO_DMA,
.irq_flags = IRQF_SHARED,
.chipset = ide_generic,
};

/*
Expand All @@ -126,7 +125,7 @@ static int __init gayle_init(void)
unsigned long base, ctrlport, irqport;
ide_ack_intr_t *ack_intr;
int a4000, i, rc;
hw_regs_t hw[GAYLE_NUM_HWIFS], *hws[] = { NULL, NULL, NULL, NULL };
struct ide_hw hw[GAYLE_NUM_HWIFS], *hws[GAYLE_NUM_HWIFS];

if (!MACH_IS_AMIGA)
return -ENODEV;
Expand Down Expand Up @@ -171,7 +170,7 @@ static int __init gayle_init(void)
hws[i] = &hw[i];
}

rc = ide_host_add(&gayle_port_info, hws, NULL);
rc = ide_host_add(&gayle_port_info, hws, i, NULL);
if (rc)
release_mem_region(res_start, res_n);

Expand Down
13 changes: 7 additions & 6 deletions trunk/drivers/ide/icside.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ static int icside_dma_off_init(ide_hwif_t *hwif, const struct ide_port_info *d)
return -EOPNOTSUPP;
}

static void icside_setup_ports(hw_regs_t *hw, void __iomem *base,
static void icside_setup_ports(struct ide_hw *hw, void __iomem *base,
struct cardinfo *info, struct expansion_card *ec)
{
unsigned long port = (unsigned long)base + info->dataoffset;
Expand All @@ -398,19 +398,19 @@ static void icside_setup_ports(hw_regs_t *hw, void __iomem *base,

hw->irq = ec->irq;
hw->dev = &ec->dev;
hw->chipset = ide_acorn;
}

static const struct ide_port_info icside_v5_port_info = {
.host_flags = IDE_HFLAG_NO_DMA,
.chipset = ide_acorn,
};

static int __devinit
icside_register_v5(struct icside_state *state, struct expansion_card *ec)
{
void __iomem *base;
struct ide_host *host;
hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL };
struct ide_hw hw, *hws[] = { &hw };
int ret;

base = ecardm_iomap(ec, ECARD_RES_MEMC, 0, 0);
Expand All @@ -431,7 +431,7 @@ icside_register_v5(struct icside_state *state, struct expansion_card *ec)

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

host = ide_host_alloc(&icside_v5_port_info, hws);
host = ide_host_alloc(&icside_v5_port_info, hws, 1);
if (host == NULL)
return -ENODEV;

Expand All @@ -457,6 +457,7 @@ static const struct ide_port_info icside_v6_port_info __initdata = {
.host_flags = IDE_HFLAG_SERIALIZE | IDE_HFLAG_MMIO,
.mwdma_mask = ATA_MWDMA2,
.swdma_mask = ATA_SWDMA2,
.chipset = ide_acorn,
};

static int __devinit
Expand All @@ -466,7 +467,7 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec)
struct ide_host *host;
unsigned int sel = 0;
int ret;
hw_regs_t hw[2], *hws[] = { &hw[0], &hw[1], NULL, NULL };
struct ide_hw hw[2], *hws[] = { &hw[0], &hw[1] };
struct ide_port_info d = icside_v6_port_info;

ioc_base = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, 0);
Expand Down Expand Up @@ -506,7 +507,7 @@ 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);

host = ide_host_alloc(&d, hws);
host = ide_host_alloc(&d, hws, 2);
if (host == NULL)
return -ENODEV;

Expand Down
Loading

0 comments on commit 04c13ee

Please sign in to comment.