Skip to contentSkip to conversation

IDE fixes

GIT PULL Bartlomiej Zolnierkiewicz 1 participant 1 message Feb 2, 2009 libata

lore
Share & tools
lore
#0 lore raw

Inside:

- ide-cd bug fix for non-bio backed requests from Borislav Petkov (closes kernel.org bug #12320).

- icside bug fix to make it work again on PCB v6.

- Port initialization failure handling fix from Ian Campbell.

- Support for CS5536 PATA controller (based on older driver from Martin K. Petersen, also extra thanks to Sergei Shtylyov for excellent review of the new driver).

- Support for AmigaOne board for VIA IDE host driver from Gerhard Pircher.

- dev->bus_id -> dev_name() conversion from Kay Sievers.

- tx4939ide update from Atsushi Nemoto.

Linus, please pull from:

master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git/

to receive the following updates:

 drivers/ide/Kconfig     |   10 ++
 drivers/ide/Makefile    |    1 +
 drivers/ide/cs5536.c    |  308 +++++++++++++++++++++++++++++++++++++++++++++++
 drivers/ide/icside.c    |    2 +-
 drivers/ide/ide-acpi.c  |    2 +-
 drivers/ide/ide-cd.c    |    3 +
 drivers/ide/ide-io.c    |    9 +-
 drivers/ide/ide-probe.c |   43 +++++--
 drivers/ide/tx4939ide.c |    4 +-
 drivers/ide/via82cxxx.c |    5 +
 10 files changed, 371 insertions(+), 16 deletions(-)
 create mode 100644 drivers/ide/cs5536.c

Atsushi Nemoto (1):
tx4939ide: typo fix and minor cleanup

Bartlomiej Zolnierkiewicz (3):
ide: fix ide_register_port() failure handling
ide: add CS5536 host driver (v3)
icside: fix PCB version 6 support (v2)

Borislav Petkov (1):
ide-cd: fix DMA for non bio-backed requests

Gerhard Pircher (1):
ide: Force VIA IDE legacy interrupts for AmigaOne boards

Ian Campbell (1):
IDE: Unregister and disable devices if initialization fails.

Kay Sievers (1):
ide: struct device - replace bus_id with dev_name(), dev_set_name()

drivers/ide/Kconfig +10 -0
index b1c6f68..3dad229 100644
@@ -465,6 +465,16 @@ config BLK_DEV_CS5535
 
 	  It is safe to say Y to this question.
 
+config BLK_DEV_CS5536
+	tristate "CS5536 chipset support"
+	depends on X86_32
+	select BLK_DEV_IDEDMA_PCI
+	help
+	  This option enables support for the AMD CS5536
+	  companion chip used with the Geode LX processor family.
+
+	  If unsure, say N.
+
 config BLK_DEV_HPT366
 	tristate "HPT36X/37X chipset support"
 	select BLK_DEV_IDEDMA_PCI
drivers/ide/Makefile +1 -0
index c2b9c93..d0e3d7d 100644
@@ -43,6 +43,7 @@ obj-$(CONFIG_BLK_DEV_CMD64X)		+= cmd64x.o
 obj-$(CONFIG_BLK_DEV_CS5520)		+= cs5520.o
 obj-$(CONFIG_BLK_DEV_CS5530)		+= cs5530.o
 obj-$(CONFIG_BLK_DEV_CS5535)		+= cs5535.o
+obj-$(CONFIG_BLK_DEV_CS5536)		+= cs5536.o
 obj-$(CONFIG_BLK_DEV_SC1200)		+= sc1200.o
 obj-$(CONFIG_BLK_DEV_CY82C693)		+= cy82c693.o
 obj-$(CONFIG_BLK_DEV_DELKIN)		+= delkin_cb.o
drivers/ide/cs5536.c new file +308 -0

308 lines not on this page · raw message

drivers/ide/icside.c +1 -1
index 97a35c6..415d7e2 100644
@@ -534,7 +534,7 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec)
 		d.dma_ops = NULL;
 	}
 
-	ret = ide_host_register(host, NULL, hws);
+	ret = ide_host_register(host, &d, hws);
 	if (ret)
 		goto err_free;
 
drivers/ide/ide-acpi.c +1 -1
index d8f295b..ec7d07f 100644
@@ -282,7 +282,7 @@ static int do_drive_get_GTF(ide_drive_t *drive,
 	port = hwif->channel ? drive->dn - 2: drive->dn;
 
 	DEBPRINT("ENTER: %s at %s, port#: %d, hard_port#: %d\n",
-		 hwif->name, dev->bus_id, port, hwif->channel);
+		 hwif->name, dev_name(dev), port, hwif->channel);
 
 	if ((drive->dev_flags & IDE_DFLAG_PRESENT) == 0) {
 		DEBPRINT("%s drive %d:%d not present\n",
drivers/ide/ide-cd.c +3 -0
index cae6937..0bfeb0c 100644
@@ -787,6 +787,9 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
 		if (blk_fs_request(rq)) {
 			ide_end_request(drive, 1, rq->nr_sectors);
 			return ide_stopped;
+		} else if (rq->cmd_type == REQ_TYPE_ATA_PC && !rq->bio) {
+			ide_end_request(drive, 1, 1);
+			return ide_stopped;
 		}
 		goto end_request;
 	}
drivers/ide/ide-io.c +6 -3
index cc16331..9ee51ad 100644
@@ -418,11 +418,14 @@ void ide_map_sg(ide_drive_t *drive, struct request *rq)
 	ide_hwif_t *hwif = drive->hwif;
 	struct scatterlist *sg = hwif->sg_table;
 
-	if (rq->cmd_type != REQ_TYPE_ATA_TASKFILE) {
-		hwif->sg_nents = blk_rq_map_sg(drive->queue, rq, sg);
-	} else {
+	if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) {
 		sg_init_one(sg, rq->buffer, rq->nr_sectors * SECTOR_SIZE);
 		hwif->sg_nents = 1;
+	} else if (!rq->bio) {
+		sg_init_one(sg, rq->data, rq->data_len);
+		hwif->sg_nents = 1;
+	} else {
+		hwif->sg_nents = blk_rq_map_sg(drive->queue, rq, sg);
 	}
 }
 
drivers/ide/ide-probe.c +34 -9

67 lines not on this page · raw message

drivers/ide/tx4939ide.c +2 -2
index 882f6f0..40b0812 100644
@@ -261,9 +261,9 @@ static int tx4939ide_build_dmatable(ide_drive_t *drive, struct request *rq)
 				bcount = cur_len;
 			/*
 			 * This workaround for zero count seems required.
-			 * (standard ide_build_dmatable do it too)
+			 * (standard ide_build_dmatable does it too)
 			 */
-			if ((bcount & 0xffff) == 0x0000)
+			if (bcount == 0x10000)
 				bcount = 0x8000;
 			*table++ = bcount & 0xffff;
 			*table++ = cur_addr;
drivers/ide/via82cxxx.c +5 -0
index 703c3ee..6092fe3 100644
@@ -448,6 +448,11 @@ static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_i
 		d.host_flags |= IDE_HFLAG_FORCE_LEGACY_IRQS;
 #endif
 
+#ifdef CONFIG_AMIGAONE
+	if (machine_is(amigaone))
+		d.host_flags |= IDE_HFLAG_FORCE_LEGACY_IRQS;
+#endif
+
 	d.udma_mask = via_config->udma_mask;
 
 	vdev = kzalloc(sizeof(*vdev), GFP_KERNEL);