diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-06-15 20:07:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-06-15 20:07:48 -0400 |
commit | 8e53ed10f871a077cc61374c74e0bbab25264208 (patch) | |
tree | 13c12409e016c7ea9fba8a4aa7ef5329b289444a | |
parent | 06da03510e0cf669a2c434484b90c0ab09d2b086 (diff) | |
parent | e58c5de8f59d124907c993ea3126c69493b7eec7 (diff) |
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
-rw-r--r-- | drivers/ide/icside.c | 17 | ||||
-rw-r--r-- | drivers/ide/ide-cs.c | 3 |
2 files changed, 10 insertions, 10 deletions
diff --git a/drivers/ide/icside.c b/drivers/ide/icside.c index 8716066a2f2b..bcb507b0cfd4 100644 --- a/drivers/ide/icside.c +++ b/drivers/ide/icside.c | |||
@@ -236,7 +236,7 @@ static const struct ide_port_ops icside_v6_no_dma_port_ops = { | |||
236 | */ | 236 | */ |
237 | static void icside_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) | 237 | static void icside_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) |
238 | { | 238 | { |
239 | unsigned long cycle_time; | 239 | unsigned long cycle_time = 0; |
240 | int use_dma_info = 0; | 240 | int use_dma_info = 0; |
241 | const u8 xfer_mode = drive->dma_mode; | 241 | const u8 xfer_mode = drive->dma_mode; |
242 | 242 | ||
@@ -271,9 +271,9 @@ static void icside_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) | |||
271 | 271 | ||
272 | ide_set_drivedata(drive, (void *)cycle_time); | 272 | ide_set_drivedata(drive, (void *)cycle_time); |
273 | 273 | ||
274 | printk("%s: %s selected (peak %dMB/s)\n", drive->name, | 274 | printk(KERN_INFO "%s: %s selected (peak %luMB/s)\n", |
275 | ide_xfer_verbose(xfer_mode), | 275 | drive->name, ide_xfer_verbose(xfer_mode), |
276 | 2000 / (unsigned long)ide_get_drivedata(drive)); | 276 | 2000 / (cycle_time ? cycle_time : (unsigned long) -1)); |
277 | } | 277 | } |
278 | 278 | ||
279 | static const struct ide_port_ops icside_v6_port_ops = { | 279 | 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 | .dma_test_irq = icside_dma_test_irq, | 375 | .dma_test_irq = icside_dma_test_irq, |
376 | .dma_lost_irq = ide_dma_lost_irq, | 376 | .dma_lost_irq = ide_dma_lost_irq, |
377 | }; | 377 | }; |
378 | #else | ||
379 | #define icside_v6_dma_ops NULL | ||
380 | #endif | 378 | #endif |
381 | 379 | ||
382 | static int icside_dma_off_init(ide_hwif_t *hwif, const struct ide_port_info *d) | 380 | static int icside_dma_off_init(ide_hwif_t *hwif, const struct ide_port_info *d) |
@@ -456,7 +454,6 @@ err_free: | |||
456 | static const struct ide_port_info icside_v6_port_info __initdata = { | 454 | static const struct ide_port_info icside_v6_port_info __initdata = { |
457 | .init_dma = icside_dma_off_init, | 455 | .init_dma = icside_dma_off_init, |
458 | .port_ops = &icside_v6_no_dma_port_ops, | 456 | .port_ops = &icside_v6_no_dma_port_ops, |
459 | .dma_ops = &icside_v6_dma_ops, | ||
460 | .host_flags = IDE_HFLAG_SERIALIZE | IDE_HFLAG_MMIO, | 457 | .host_flags = IDE_HFLAG_SERIALIZE | IDE_HFLAG_MMIO, |
461 | .mwdma_mask = ATA_MWDMA2, | 458 | .mwdma_mask = ATA_MWDMA2, |
462 | .swdma_mask = ATA_SWDMA2, | 459 | .swdma_mask = ATA_SWDMA2, |
@@ -518,11 +515,13 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec) | |||
518 | 515 | ||
519 | ecard_set_drvdata(ec, state); | 516 | ecard_set_drvdata(ec, state); |
520 | 517 | ||
518 | #ifdef CONFIG_BLK_DEV_IDEDMA_ICS | ||
521 | if (ec->dma != NO_DMA && !request_dma(ec->dma, DRV_NAME)) { | 519 | if (ec->dma != NO_DMA && !request_dma(ec->dma, DRV_NAME)) { |
522 | d.init_dma = icside_dma_init; | 520 | d.init_dma = icside_dma_init; |
523 | d.port_ops = &icside_v6_port_ops; | 521 | d.port_ops = &icside_v6_port_ops; |
524 | } else | 522 | d.dma_ops = &icside_v6_dma_ops; |
525 | d.dma_ops = NULL; | 523 | } |
524 | #endif | ||
526 | 525 | ||
527 | ret = ide_host_register(host, &d, hws); | 526 | ret = ide_host_register(host, &d, hws); |
528 | if (ret) | 527 | if (ret) |
diff --git a/drivers/ide/ide-cs.c b/drivers/ide/ide-cs.c index 28e344ea514c..f1e922e2479a 100644 --- a/drivers/ide/ide-cs.c +++ b/drivers/ide/ide-cs.c | |||
@@ -167,7 +167,8 @@ static int pcmcia_check_one_config(struct pcmcia_device *pdev, void *priv_data) | |||
167 | { | 167 | { |
168 | int *is_kme = priv_data; | 168 | int *is_kme = priv_data; |
169 | 169 | ||
170 | if (!(pdev->resource[0]->flags & IO_DATA_PATH_WIDTH_8)) { | 170 | if ((pdev->resource[0]->flags & IO_DATA_PATH_WIDTH) |
171 | != IO_DATA_PATH_WIDTH_8) { | ||
171 | pdev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; | 172 | pdev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; |
172 | pdev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; | 173 | pdev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; |
173 | } | 174 | } |