Commit 8e53ed10 authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide

Pull IDE fixes from David S. Miller:

1) Two fixes to icside, one for a build failure and another for a
   warning.  From Christian Dietrich.

2) Fix a bit operation that did erroneous masking, from Julia Lawall.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide:
  drivers/ide/ide-cs.c: adjust suspicious bit operation
  ide: icside.c: fix printk format string compile warning
  ide: icside.c: Fix compile with CONFIG_BLK_DEV_IDEDMA_ICS=n
parents 06da0351 e58c5de8
...@@ -236,7 +236,7 @@ static const struct ide_port_ops icside_v6_no_dma_port_ops = { ...@@ -236,7 +236,7 @@ static const struct ide_port_ops icside_v6_no_dma_port_ops = {
*/ */
static void icside_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) static void icside_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive)
{ {
unsigned long cycle_time; unsigned long cycle_time = 0;
int use_dma_info = 0; int use_dma_info = 0;
const u8 xfer_mode = drive->dma_mode; const u8 xfer_mode = drive->dma_mode;
...@@ -271,9 +271,9 @@ static void icside_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) ...@@ -271,9 +271,9 @@ static void icside_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive)
ide_set_drivedata(drive, (void *)cycle_time); ide_set_drivedata(drive, (void *)cycle_time);
printk("%s: %s selected (peak %dMB/s)\n", drive->name, printk(KERN_INFO "%s: %s selected (peak %luMB/s)\n",
ide_xfer_verbose(xfer_mode), drive->name, ide_xfer_verbose(xfer_mode),
2000 / (unsigned long)ide_get_drivedata(drive)); 2000 / (cycle_time ? cycle_time : (unsigned long) -1));
} }
static const struct ide_port_ops icside_v6_port_ops = { static const struct ide_port_ops icside_v6_port_ops = {
...@@ -375,8 +375,6 @@ static const struct ide_dma_ops icside_v6_dma_ops = { ...@@ -375,8 +375,6 @@ static const struct ide_dma_ops icside_v6_dma_ops = {
.dma_test_irq = icside_dma_test_irq, .dma_test_irq = icside_dma_test_irq,
.dma_lost_irq = ide_dma_lost_irq, .dma_lost_irq = ide_dma_lost_irq,
}; };
#else
#define icside_v6_dma_ops NULL
#endif #endif
static int icside_dma_off_init(ide_hwif_t *hwif, const struct ide_port_info *d) static int icside_dma_off_init(ide_hwif_t *hwif, const struct ide_port_info *d)
...@@ -456,7 +454,6 @@ icside_register_v5(struct icside_state *state, struct expansion_card *ec) ...@@ -456,7 +454,6 @@ icside_register_v5(struct icside_state *state, struct expansion_card *ec)
static const struct ide_port_info icside_v6_port_info __initdata = { static const struct ide_port_info icside_v6_port_info __initdata = {
.init_dma = icside_dma_off_init, .init_dma = icside_dma_off_init,
.port_ops = &icside_v6_no_dma_port_ops, .port_ops = &icside_v6_no_dma_port_ops,
.dma_ops = &icside_v6_dma_ops,
.host_flags = IDE_HFLAG_SERIALIZE | IDE_HFLAG_MMIO, .host_flags = IDE_HFLAG_SERIALIZE | IDE_HFLAG_MMIO,
.mwdma_mask = ATA_MWDMA2, .mwdma_mask = ATA_MWDMA2,
.swdma_mask = ATA_SWDMA2, .swdma_mask = ATA_SWDMA2,
...@@ -518,11 +515,13 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec) ...@@ -518,11 +515,13 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec)
ecard_set_drvdata(ec, state); ecard_set_drvdata(ec, state);
#ifdef CONFIG_BLK_DEV_IDEDMA_ICS
if (ec->dma != NO_DMA && !request_dma(ec->dma, DRV_NAME)) { if (ec->dma != NO_DMA && !request_dma(ec->dma, DRV_NAME)) {
d.init_dma = icside_dma_init; d.init_dma = icside_dma_init;
d.port_ops = &icside_v6_port_ops; d.port_ops = &icside_v6_port_ops;
} else d.dma_ops = &icside_v6_dma_ops;
d.dma_ops = NULL; }
#endif
ret = ide_host_register(host, &d, hws); ret = ide_host_register(host, &d, hws);
if (ret) if (ret)
......
...@@ -167,7 +167,8 @@ static int pcmcia_check_one_config(struct pcmcia_device *pdev, void *priv_data) ...@@ -167,7 +167,8 @@ static int pcmcia_check_one_config(struct pcmcia_device *pdev, void *priv_data)
{ {
int *is_kme = priv_data; int *is_kme = priv_data;
if (!(pdev->resource[0]->flags & IO_DATA_PATH_WIDTH_8)) { if ((pdev->resource[0]->flags & IO_DATA_PATH_WIDTH)
!= IO_DATA_PATH_WIDTH_8) {
pdev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; pdev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH;
pdev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; pdev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment