[PATCH] Suspend support for libata
This patch adds suspend patch to libata, and ata_piix in particular. For most low level drivers, they should just need to add the 4 hooks to work. As I can only test ata_piix, I didn't enable it for more though. Suspend support is the single most important feature on a notebook, and most new notebooks have sata drives. It's quite embarrassing that we _still_ do not support this. Right now, it's perfectly possible to suspend the drive in mid-transfer. Signed-off-by: Jens Axboe <axboe@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

parent
88202a0c84
commit
9b84754866
@@ -124,6 +124,8 @@ enum {
|
||||
ATA_FLAG_DEBUGMSG = (1 << 10),
|
||||
ATA_FLAG_NO_ATAPI = (1 << 11), /* No ATAPI support */
|
||||
|
||||
ATA_FLAG_SUSPENDED = (1 << 12), /* port is suspended */
|
||||
|
||||
ATA_QCFLAG_ACTIVE = (1 << 1), /* cmd not yet ack'd to scsi lyer */
|
||||
ATA_QCFLAG_SG = (1 << 3), /* have s/g table? */
|
||||
ATA_QCFLAG_SINGLE = (1 << 4), /* no s/g, just a single buffer */
|
||||
@@ -436,6 +438,8 @@ extern void ata_std_ports(struct ata_ioports *ioaddr);
|
||||
extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info,
|
||||
unsigned int n_ports);
|
||||
extern void ata_pci_remove_one (struct pci_dev *pdev);
|
||||
extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t state);
|
||||
extern int ata_pci_device_resume(struct pci_dev *pdev);
|
||||
#endif /* CONFIG_PCI */
|
||||
extern int ata_device_add(const struct ata_probe_ent *ent);
|
||||
extern void ata_host_set_remove(struct ata_host_set *host_set);
|
||||
@@ -445,6 +449,10 @@ extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmn
|
||||
extern int ata_scsi_error(struct Scsi_Host *host);
|
||||
extern int ata_scsi_release(struct Scsi_Host *host);
|
||||
extern unsigned int ata_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc);
|
||||
extern int ata_scsi_device_resume(struct scsi_device *);
|
||||
extern int ata_scsi_device_suspend(struct scsi_device *);
|
||||
extern int ata_device_resume(struct ata_port *, struct ata_device *);
|
||||
extern int ata_device_suspend(struct ata_port *, struct ata_device *);
|
||||
extern int ata_ratelimit(void);
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user