mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [PATCH 2.6.11-rc2 02/04] ide: __ide_do_rw_disk() rewritten ide_write_taskfil
@ 2005-02-12  1:55 Chuck Ebbert
  0 siblings, 0 replies; only message in thread
From: Chuck Ebbert @ 2005-02-12  1:55 UTC (permalink / raw)
  To: Tejun Heo; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel, linux-ide

On Sun,  6 Feb 2005 at 20:26:55 +0900, Tejun Heo wrote:

> +     if (drive->using_dma &&
> +         !(hwif->no_lba48_dma && block + rq->nr_sectors > 1ULL << 28)) {
> +             /* DMA */
> +             if (hwif->dma_setup(drive))
> +                     goto fallback_to_pio;
> +             if (rq_data_dir(rq) == READ) {
> +                     command = lba48 ? WIN_READDMA_EXT : WIN_READDMA;
> +                     if (drive->vdma)
> +                             command = lba48 ? WIN_READ_EXT : WIN_READ;
> +             } else {
> +                     command = lba48 ? WIN_WRITEDMA_EXT : WIN_WRITEDMA;
> +                     if (drive->vdma)
> +                             command = lba48 ? WIN_WRITE_EXT : WIN_WRITE;
>               }
> -             /* fallback to PIO */
> -             ide_init_sg_cmd(drive, rq);
> +             hwif->dma_exec_cmd(drive, command);
> +             hwif->dma_start(drive);
> +             return ide_started;
>       }


  Should that be "block + rq->nr_sectors >= 1ULL << 28"?

  Legal sector numbers for LBA28 range from 0 thru (1 << 28 - 1).

  LBA28 _capacities_ range from 1 thru (1 << 28) sectors.

  And why is it using 1ULL some places and 1UL in others in the ide driver?

--
Chuck

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-02-12  1:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-12  1:55 [PATCH 2.6.11-rc2 02/04] ide: __ide_do_rw_disk() rewritten ide_write_taskfil Chuck Ebbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®