Skip to contentSkip to conversation

2.6.x libata minor updates

PATCH New Jeff Garzik 1 participant 1 message Oct 30, 2004

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

PATCH 1/1 2.6.x libata minor updates

Please do a

bk pull bk://gkernel.bkbits.net/libata-2.6

This will update the following files:

 drivers/scsi/ahci.c    |    9 +++------
 include/linux/libata.h |    5 ++---
 2 files changed, 5 insertions(+), 9 deletions(-)

through these ChangeSets:

<[email protected]> (04/10/30 1.2346)
[PATCH] scsi/ahci: replace schedule_timeout() with msleep()/ssleep()

Description: Uses msleep() / ssleep() [as appropriate] instead of schedule_timeout() to guarantee the task delays as expected.

<[email protected]> (04/10/27 1.2214.1.1)
[libata] cosmetic libata.h changes to make merging with 2.4 easier

drivers/scsi/ahci.c +3 -6
diff -Nru a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
@@ -363,8 +363,7 @@
 	/* spec says 500 msecs for each PORT_CMD_{START,FIS_RX} bit, so
 	 * this is slightly incorrect.
 	 */
-	set_current_state(TASK_UNINTERRUPTIBLE);
-	schedule_timeout((HZ / 2) + 1);
+	msleep(500);
 
 	ap->private_data = NULL;
 	pci_free_consistent(pdev, AHCI_PORT_PRIV_DMA_SZ,
@@ -719,8 +718,7 @@
 	/* reset must complete within 1 second, or
 	 * the hardware should be considered fried.
 	 */
-	set_current_state(TASK_UNINTERRUPTIBLE);
-	schedule_timeout(HZ + 1);
+	ssleep(1);
 
 	tmp = readl(mmio + HOST_CTL);
 	if (tmp & HOST_RESET) {
@@ -798,8 +796,7 @@
 			/* spec says 500 msecs for each bit, so
 			 * this is slightly incorrect.
 			 */
-			set_current_state(TASK_UNINTERRUPTIBLE);
-			schedule_timeout((HZ / 2) + 1);
+			msleep(500);
 		}
 
 		writel(PORT_CMD_SPIN_UP, port_mmio + PORT_CMD);
include/linux/libata.h +2 -3
diff -Nru a/include/linux/libata.h b/include/linux/libata.h
@@ -417,13 +417,12 @@
 extern int pci_test_config_bits(struct pci_dev *pdev, struct pci_bits *bits);
 extern void ata_qc_complete(struct ata_queued_cmd *qc, u8 drv_stat);
 extern void ata_eng_timeout(struct ata_port *ap);
+extern void ata_scsi_simulate(u16 *id, struct scsi_cmnd *cmd,
+			      void (*done)(struct scsi_cmnd *));
 extern int ata_std_bios_param(struct scsi_device *sdev,
 			      struct block_device *bdev,
 			      sector_t capacity, int geom[]);
 extern int ata_scsi_slave_config(struct scsi_device *sdev);
-extern void ata_scsi_simulate(u16 *id,
-			      struct scsi_cmnd *cmd,
-			      void (*done)(struct scsi_cmnd *));
 
 static inline unsigned int ata_tag_valid(unsigned int tag)
 {