Skip to contentSkip to conversation

libata update

PATCH New Jeff Garzik 1 participant 1 message Sep 8, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libata update

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

to obtain the two changes described below:

 drivers/scsi/ata_piix.c |   10 +++--
 drivers/scsi/sata_sis.c |   82 +++++++++++++++++++++++++++++++++++++++++-------
 2 files changed, 77 insertions(+), 15 deletions(-)

commit 6a690df5c8b37d4a1c41df40770d42d44fac0e97

Author: Hannes Reinecke <[email protected]>
Date:   Tue Jun 28 17:30:38 2005 -0700

[PATCH] scan all enabled ports on ata_piix

ICH6 spec defines the PORT_ bits as:

PORT_ENABLED (R/W):

0 = Disabled. The port is in the off state and cannot detect any devices.

1 = Enabled. The port can transition between the on, partial, and slumber states and can detect devices.

PORT_PRESENT (R/O)

The status of this bit may change at any time. This bit is cleared when the port is disabled via PORT_ENABLED. This bit is not cleared upon surprise removal of a device.

So from a textual view it is not necessary that PORT_PRESENT _must_ be set, especially if a device detection has to be done anyway. And, in fact, this is the view that ACER has been taken with its new Laptops (e.g. Travelmate 4150).

And the definition of PORT_ENABLED / PORT_PRESENT is mixed up, btw.

commit f2c853bca542f5ac0b036377637192a74f2091c2

Author: Arnaud Patard <[email protected]>
Date:   Wed Sep 7 22:44:48 2005 +0200

[PATCH] sata_sis: Add support for SiS182 chipset

This patch adds support for the SiS182 sata chipset. This is a minimalistic version of the patch from
http://bugme.osdl.org/show_bug.cgi?id=4192. Basically, it add the PCI IDs and handles the change of the 2nd port adress register.

drivers/scsi/ata_piix.c +6 -4
@@ -68,8 +68,8 @@ enum {
 	PIIX_COMB_PATA_P0	= (1 << 1),
 	PIIX_COMB		= (1 << 2), /* combined mode enabled? */
 
-	PIIX_PORT_PRESENT	= (1 << 0),
-	PIIX_PORT_ENABLED	= (1 << 4),
+	PIIX_PORT_ENABLED	= (1 << 0),
+	PIIX_PORT_PRESENT	= (1 << 4),
 
 	PIIX_80C_PRI		= (1 << 5) | (1 << 4),
 	PIIX_80C_SEC		= (1 << 7) | (1 << 6),
@@ -377,7 +377,9 @@ static void piix_pata_phy_reset(struct a
  *	None (inherited from caller).
  *
  *	RETURNS:
- *	Non-zero if device detected, zero otherwise.
+ *	Non-zero if port is enabled, it may or may not have a device
+ *	attached in that case (PRESENT bit would only be set if BIOS probe
+ *	was done). Zero is returned if port is disabled.
  */
 static int piix_sata_probe (struct ata_port *ap)
 {
@@ -401,7 +403,7 @@ static int piix_sata_probe (struct ata_p
 	 */
 
 	for (i = 0; i < 4; i++) {
-		mask = (PIIX_PORT_PRESENT << i) | (PIIX_PORT_ENABLED << i);
+		mask = (PIIX_PORT_ENABLED << i);
 
 		if ((orig_mask & mask) == mask)
 			if (combined || (i == ap->hard_port_no))
drivers/scsi/sata_sis.c +71 -11

157 lines not on this page · raw message