[PATCH] libata: make the owner of a qc responsible for freeing it
qc used to be freed automatically on command completion. However, as a qc can carry information about its completion status, it can be useful to its owner/issuer after command completion. This patch makes freeing qc responsibility of its owner. This simplifies ata_exec_internal() and makes command turn-around for atapi request sensing less hackish. This change was originally suggested by Jeff Garzik. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
This commit is contained in:
parent
4ba946e9d8
commit
77853bf2b4
3 changed files with 21 additions and 42 deletions
|
@ -235,7 +235,7 @@ struct ata_port;
|
|||
struct ata_queued_cmd;
|
||||
|
||||
/* typedefs */
|
||||
typedef int (*ata_qc_cb_t) (struct ata_queued_cmd *qc);
|
||||
typedef void (*ata_qc_cb_t) (struct ata_queued_cmd *qc);
|
||||
|
||||
struct ata_ioports {
|
||||
unsigned long cmd_addr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue