Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Linus Torvalds committed Jun 16, 2012
2 parents 06da035 + e58c5de commit 8e53ed1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
17 changes: 8 additions & 9 deletions drivers/ide/icside.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
unsigned long cycle_time;
unsigned long cycle_time = 0;
int use_dma_info = 0;
const u8 xfer_mode = drive->dma_mode;

Expand Down Expand Up @@ -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);

printk("%s: %s selected (peak %dMB/s)\n", drive->name,
ide_xfer_verbose(xfer_mode),
2000 / (unsigned long)ide_get_drivedata(drive));
printk(KERN_INFO "%s: %s selected (peak %luMB/s)\n",
drive->name, ide_xfer_verbose(xfer_mode),
2000 / (cycle_time ? cycle_time : (unsigned long) -1));
}

static const struct ide_port_ops icside_v6_port_ops = {
Expand Down Expand Up @@ -375,8 +375,6 @@ static const struct ide_dma_ops icside_v6_dma_ops = {
.dma_test_irq = icside_dma_test_irq,
.dma_lost_irq = ide_dma_lost_irq,
};
#else
#define icside_v6_dma_ops NULL
#endif

static int icside_dma_off_init(ide_hwif_t *hwif, const struct ide_port_info *d)
Expand Down Expand Up @@ -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 = {
.init_dma = icside_dma_off_init,
.port_ops = &icside_v6_no_dma_port_ops,
.dma_ops = &icside_v6_dma_ops,
.host_flags = IDE_HFLAG_SERIALIZE | IDE_HFLAG_MMIO,
.mwdma_mask = ATA_MWDMA2,
.swdma_mask = ATA_SWDMA2,
Expand Down Expand Up @@ -518,11 +515,13 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec)

ecard_set_drvdata(ec, state);

#ifdef CONFIG_BLK_DEV_IDEDMA_ICS
if (ec->dma != NO_DMA && !request_dma(ec->dma, DRV_NAME)) {
d.init_dma = icside_dma_init;
d.port_ops = &icside_v6_port_ops;
} else
d.dma_ops = NULL;
d.dma_ops = &icside_v6_dma_ops;
}
#endif

ret = ide_host_register(host, &d, hws);
if (ret)
Expand Down
3 changes: 2 additions & 1 deletion drivers/ide/ide-cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ static int pcmcia_check_one_config(struct pcmcia_device *pdev, void *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_AUTO;
}
Expand Down

0 comments on commit 8e53ed1

Please sign in to comment.