Skip to contentSkip to conversation

libata fixes

PATCH In review Jeff Garzik 4 participants 7 messages Jul 3, 2007 – Jul 4, 2007 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libata fixes

Please pull from 'upstream-linus' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git upstream-linus

to receive the following updates:

 drivers/ata/ata_generic.c       |    2 +-
 drivers/ata/libata-core.c       |    6 +++---
 drivers/ata/libata-sff.c        |    5 +++--
 drivers/ata/pata_ali.c          |    8 ++++----
 drivers/ata/pata_cs5520.c       |    5 +++++
 drivers/ata/pata_pcmcia.c       |    2 +-
 drivers/ata/pata_pdc202xx_old.c |    4 ++--
 drivers/ata/sata_mv.c           |    3 +++
 8 files changed, 22 insertions(+), 13 deletions(-)

Alan Cox (3):
ata_generic: Check the right register for the DMA enabled flags
pata_pdc202xx_old: Correct cable detect logic
pata_pcmcia: Switch to ata_sff_port_start

Chuck Ebbert (1):
pata_ali: fix UDMA settings

Florian Attenberger (1):
sata_mv: PCI-ID for Adaptec 1430SA SATA Controller

Tejun Heo (1):
libata: fix assigned IRQ reporting

drivers/ata/ata_generic.c +1 -1
index 7565f02..4c6e95c 100644
@@ -50,7 +50,7 @@ static int generic_set_mode(struct ata_port *ap, struct ata_device **unused)
 
 	/* Bits 5 and 6 indicate if DMA is active on master/slave */
 	if (ap->ioaddr.bmdma_addr)
-		dma_enabled = ioread8(ap->ioaddr.bmdma_addr + ATA_DMA_CMD);
+		dma_enabled = ioread8(ap->ioaddr.bmdma_addr + ATA_DMA_STATUS);
 
 	for (i = 0; i < ATA_MAX_DEVICES; i++) {
 		struct ata_device *dev = &ap->device[i];
drivers/ata/libata-core.c +3 -3
index 2407f84..981b397 100644
@@ -6423,14 +6423,14 @@ int ata_host_activate(struct ata_host *host, int irq,
 	if (rc)
 		return rc;
 
+	/* Used to print device info at probe */
+	host->irq = irq;
+
 	rc = ata_host_register(host, sht);
 	/* if failed, just free the IRQ and leave ports alone */
 	if (rc)
 		devm_free_irq(host->dev, irq, host);
 
-	/* Used to print device info at probe */
-	host->irq = irq;
-
 	return rc;
 }
 
drivers/ata/libata-sff.c +3 -2
index ce84805..fa1c22c 100644
@@ -1065,10 +1065,11 @@ int ata_pci_init_one(struct pci_dev *pdev,
 	if (rc)
 		goto err_out;
 
-	if (!legacy_mode)
+	if (!legacy_mode) {
 		rc = devm_request_irq(dev, pdev->irq, pi->port_ops->irq_handler,
 				      IRQF_SHARED, DRV_NAME, host);
-	else {
+		host->irq = pdev->irq;
+	} else {
 		irq_handler_t handler[2] = { host->ops->irq_handler,
 					     host->ops->irq_handler };
 		unsigned int irq_flags[2] = { IRQF_SHARED, IRQF_SHARED };
drivers/ata/pata_ali.c +4 -4
index 3c55a5f..75e95bd 100644
@@ -550,22 +550,22 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 		.udma_mask = 0x1f,
 		.port_ops = &ali_c2_port_ops
 	};
-	/* Revision 0xC3 is UDMA100 */
+	/* Revision 0xC3 is UDMA66 for now */
 	static const struct ata_port_info info_c3 = {
 		.sht = &ali_sht,
 		.flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST | ATA_FLAG_PIO_LBA48,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
-		.udma_mask = 0x3f,
+		.udma_mask = 0x1f,
 		.port_ops = &ali_c2_port_ops
 	};
-	/* Revision 0xC4 is UDMA133 */
+	/* Revision 0xC4 is UDMA100 */
 	static const struct ata_port_info info_c4 = {
 		.sht = &ali_sht,
 		.flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST | ATA_FLAG_PIO_LBA48,
 		.pio_mask = 0x1f,
 		.mwdma_mask = 0x07,
-		.udma_mask = 0x7f,
+		.udma_mask = 0x3f,
 		.port_ops = &ali_c2_port_ops
 	};
 	/* Revision 0xC5 is UDMA133 with LBA48 DMA */
drivers/ata/pata_cs5520.c +5 -0
index 1aabe15..00cf013 100644
@@ -284,6 +284,11 @@ static int __devinit cs5520_init_one(struct pci_dev *pdev, const struct pci_devi
 				      ata_interrupt, 0, DRV_NAME, host);
 		if (rc)
 			return rc;
+
+		if (i == 0)
+			host->irq = irq[0];
+		else
+			host->irq2 = irq[1];
 	}
 
 	return ata_host_register(host, &cs5520_sht);
drivers/ata/pata_pcmcia.c +1 -1
index 4d44c75..a56257c 100644
@@ -129,7 +129,7 @@ static struct ata_port_operations pcmcia_port_ops = {
 	.irq_on		= ata_irq_on,
 	.irq_ack	= ata_irq_ack,
 
-	.port_start	= ata_port_start,
+	.port_start	= ata_sff_port_start,
 };
 
 #define CS_CHECK(fn, ret) \
drivers/ata/pata_pdc202xx_old.c +2 -2
index edbaf9d..d277246 100644
@@ -31,8 +31,8 @@ static int pdc2026x_cable_detect(struct ata_port *ap)
 
 	pci_read_config_word(pdev, 0x50, &cis);
 	if (cis & (1 << (10 + ap->port_no)))
-		return ATA_CBL_PATA80;
-	return ATA_CBL_PATA40;
+		return ATA_CBL_PATA40;
+	return ATA_CBL_PATA80;
 }
 
 /**
drivers/ata/sata_mv.c +3 -0
index c957e6e..590f2f9 100644
@@ -582,6 +582,9 @@ static const struct pci_device_id mv_pci_tbl[] = {
 
 	{ PCI_VDEVICE(ADAPTEC2, 0x0241), chip_604x },
 
+	/* Adaptec 1430SA */
+	{ PCI_VDEVICE(ADAPTEC2, 0x0243), chip_7042 },
+
 	{ PCI_VDEVICE(TTI, 0x2310), chip_7042 },
 
 	/* add Marvell 7042 support */
#2 lore raw
Quoted 8 lines · Alan Cox
Quoted 3 lines

Chuck Ebbert (1):
pata_ali: fix UDMA settings

Could you please fix your git tree to have the proper credits for patches you pull from bugzilla.

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=242472

I don't think it is Jeff who needs to fix anything: it seems that it is Chuck Ebbert you should talk to. He's the one that dropped the attribution. Probably because of some insane system he uses (he has a comment in that bugzilla about "patch from comment #14 is in CVS now.".

CVS? What kind if insane setup do you have there at Red Hat?

Linus

#3 lore raw
Quoted 4 lines

attribution. Probably because of some insane system he uses (he has a comment in that bugzilla about "patch from comment #14 is in CVS now.".

CVS? What kind if insane setup do you have there at Red Hat?

CVS is used for tracking patch sets for RPMS rather than source trees. Its quite good at that job and its reliable and proven and has been done that way for years. When you are keeping a stable distribution for large business end users the "stable and proven" wins over new technology...

Alan

#4 lore raw
Quoted 10 lines · Alan Cox
Quoted 5 lines

attribution. Probably because of some insane system he uses (he has a comment in that bugzilla about "patch from comment #14 is in CVS now.".

CVS? What kind if insane setup do you have there at Red Hat?

CVS is used for tracking patch sets for RPMS rather than source trees. Its quite good at that job and its reliable and proven and has been done that way for years. When you are keeping a stable distribution for large business end users the "stable and proven" wins over new technology...

Yes, but it also explains why it lost all authorship.

So instead of complaining to Jeff about this, you should look at YOUR OWN damn system. It was apparently your "enterprise ready" stuff, used by another Red Hat engineer, that screwed up.

THAT is my point.

Linus

#5 lore raw
Quoted 3 lines

So instead of complaining to Jeff about this, you should look at YOUR OWN damn system. It was apparently your "enterprise ready" stuff, used by another Red Hat engineer, that screwed up.

Umm no Linus.

Chuck posted a link to an attachment in bugzilla not to anything from version control. And the bugzilla bug clearly indicates who posted the attachment. Probably Chuck should have posted the bug number as well.

Alan

#6 lore raw
Quoted 3 lines · Alan Cox

Chuck posted a link to an attachment in bugzilla not to anything from version control. And the bugzilla bug clearly indicates who posted the attachment. Probably Chuck should have posted the bug number as well.

Perhaps it would have helped if the attachment itself contained a short comment and some information about its own provenance.

It can be painful trawling through bugzilla to find the latest version of a patch -- a direct link to the attachment often is much nicer. And the person who attaches a bug to bugzilla isn't necessarily the author of it anyway.

Signature · 1 line
dwmw2