Re: [PATCH 0/2] fix libata-sff and pata_cmd64x to not crash on boot on parisc

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

 



Hello.

On 19-04-2011 0:50, James Bottomley wrote:

You shouldn't need to touch a single line of the core libata code,
although it might be the best way of doing it.

So how about this, using the dummy port info mechanism.  I get a
spurious ata2: DUMMY message, but I suppose libata people are used to
that.  I still have to fix libata to prevent spurious irq information,
but that's cosmetic.

James

---

diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c
index 905ff76..10dabe9 100644
--- a/drivers/ata/pata_cmd64x.c
+++ b/drivers/ata/pata_cmd64x.c
@@ -354,6 +361,19 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
  	mrdmode |= 0x02;	/* Memory read line enable */
  	pci_write_config_byte(pdev, MRDMODE, mrdmode);

+	/* check for enabled ports */
+	pci_read_config_byte(pdev, ENPORT,&reg);
+	/* the cm643 primary port is always enabled */
+	if (id->driver_data != 0&&  !(reg&  ENPORT_PRIMARY)) {
+		dev_printk(KERN_ERR,&pdev->dev, "Primary port is disabled; detaching\n");

   This is no longer true.

+		ppi[0] =&ata_dummy_port_info;
+		
+	}

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


[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux