summaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-04-19 04:00:00 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-04-19 04:00:00 +0000
commit46e045034336a2cc90c1798cd7cc07af744ddfd6 (patch)
tree3b9b51fc482e729f663d25333e77fbed9aaa939a /drivers/ide
parent31dc59d503a02e84c4de98826452acaeb56dc15a (diff)
Merge with Linux 2.3.99-pre4.
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-disk.c20
-rw-r--r--drivers/ide/ide-pci.c2
-rw-r--r--drivers/ide/ide.c1
3 files changed, 15 insertions, 8 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index 33014bc06..e8cfa5c7a 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -813,14 +813,18 @@ static void idedisk_setup (ide_drive_t *drive)
(!drive->forced_geom) && drive->bios_sect && drive->bios_head)
drive->bios_cyl = (capacity / drive->bios_sect) / drive->bios_head;
-#if 0 /* done instead for entire identify block in arch/ide.h stuff */
- /* fix byte-ordering of buffer size field */
- id->buf_size = le16_to_cpu(id->buf_size);
-#endif
- printk (KERN_INFO "%s: %.40s, %ldMB w/%dkB Cache, CHS=%d/%d/%d",
- drive->name, id->model,
- capacity/2048L, id->buf_size/2,
- drive->bios_cyl, drive->bios_head, drive->bios_sect);
+ printk (KERN_INFO "%s: %ld sectors", drive->name, capacity);
+
+ /* Give size in megabytes (MB), not mebibytes (MiB). */
+ /* We compute the exact rounded value, avoiding overflow. */
+ printk (" (%ld MB)", (capacity - capacity/625 + 974)/1950);
+
+ /* Only print cache size when it was specified */
+ if (id->buf_size)
+ printk (" w/%dKiB Cache", id->buf_size/2);
+
+ printk(", CHS=%d/%d/%d",
+ drive->bios_cyl, drive->bios_head, drive->bios_sect);
#ifdef CONFIG_BLK_DEV_IDEDMA
if (drive->using_dma)
(void) HWIF(drive)->dmaproc(ide_dma_verbose, drive);
diff --git a/drivers/ide/ide-pci.c b/drivers/ide/ide-pci.c
index cdd10f6e1..35ba5cb5f 100644
--- a/drivers/ide/ide-pci.c
+++ b/drivers/ide/ide-pci.c
@@ -603,6 +603,8 @@ check_if_enabled:
IDE_PCI_DEVID_EQ(d->devid, DEVID_HPT366) ||
IDE_PCI_DEVID_EQ(d->devid, DEVID_CS5530) ||
IDE_PCI_DEVID_EQ(d->devid, DEVID_CY82C693) ||
+ IDE_PCI_DEVID_EQ(d->devid, DEVID_CMD646) ||
+ IDE_PCI_DEVID_EQ(d->devid, DEVID_CMD648) ||
((dev->class >> 8) == PCI_CLASS_STORAGE_IDE && (dev->class & 0x80))) {
unsigned long dma_base = ide_get_or_set_dma_base(hwif, (!mate && d->extra) ? d->extra : 0, d->name);
if (dma_base && !(pcicmd & PCI_COMMAND_MASTER)) {
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 89921f7b9..fb24fb0a5 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -1662,6 +1662,7 @@ void ide_init_drive_cmd (struct request *rq)
rq->cmd = IDE_DRIVE_CMD;
rq->sector = 0;
rq->nr_sectors = 0;
+ rq->nr_segments = 0;
rq->current_nr_sectors = 0;
rq->sem = NULL;
rq->bh = NULL;