Re: dvd-r detection problem with port multiplier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Can you please test the following patch?  The spec says that clearing
PMP status should be followed by port initialization and I missed that
before.

Index: work1/drivers/scsi/sata_sil24.c
===================================================================
--- work1.orig/drivers/scsi/sata_sil24.c	2006-09-27 11:35:00.000000000 +0900
+++ work1/drivers/scsi/sata_sil24.c	2006-09-27 11:35:04.000000000 +0900
@@ -594,15 +594,17 @@ static int sil24_init_port(struct ata_po
 	struct sil24_port_priv *pp = ap->private_data;
 	u32 tmp;
 
+	if (ap->nr_pmp_links) {
+		/* clear PMP error status */
+		sil24_clear_pmp(ap);
+	}
+
 	writel(PORT_CS_INIT, port + PORT_CTRL_STAT);
 	ata_wait_register(port + PORT_CTRL_STAT,
 			  PORT_CS_INIT, PORT_CS_INIT, 10, 100);
 	tmp = ata_wait_register(port + PORT_CTRL_STAT,
 				PORT_CS_RDY, 0, 10, 100);
 
-	/* clear PMP error status */
-	sil24_clear_pmp(ap);
-
 	if ((tmp & (PORT_CS_INIT | PORT_CS_RDY)) != PORT_CS_RDY) {
 		pp->do_port_rst = 1;
 		ap->link.eh_context.i.action |= ATA_EH_HARDRESET;
@@ -916,12 +918,12 @@ static void sil24_irq_clear(struct ata_p
 static void sil24_pmp_attach(struct ata_port *ap)
 {
 	sil24_config_pmp(ap, 1);
-	sil24_clear_pmp(ap);
+	sil24_init_port(ap);
 }
 
 static void sil24_pmp_detach(struct ata_port *ap)
 {
-	sil24_clear_pmp(ap);
+	sil24_init_port(ap);
 	sil24_config_pmp(ap, 0);
 }
 

-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux