Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21817
b: refs/heads/master
c: 7944ea9
h: refs/heads/master
i:
  21815: 3279759
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Feb 9, 2006
1 parent b76d249 commit b9c5e99
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5140788f77d71b4f05fde217adbfb0c92f28f20c
refs/heads/master: 7944ea9522ce0ea32d57894b3dc2540b0bdca66e
9 changes: 7 additions & 2 deletions trunk/drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2485,7 +2485,8 @@ int ata_std_probe_reset(struct ata_port *ap, unsigned int *classes)
if (ap->flags & ATA_FLAG_SATA && ap->ops->scr_read)
hardreset = sata_std_hardreset;

return ata_drive_probe_reset(ap, ata_std_softreset, hardreset,
return ata_drive_probe_reset(ap, NULL,
ata_std_softreset, hardreset,
ata_std_postreset, classes);
}

Expand Down Expand Up @@ -2524,6 +2525,7 @@ static int do_probe_reset(struct ata_port *ap, ata_reset_fn_t reset,
/**
* ata_drive_probe_reset - Perform probe reset with given methods
* @ap: port to reset
* @probeinit: probeinit method (can be NULL)
* @softreset: softreset method (can be NULL)
* @hardreset: hardreset method (can be NULL)
* @postreset: postreset method (can be NULL)
Expand Down Expand Up @@ -2552,12 +2554,15 @@ static int do_probe_reset(struct ata_port *ap, ata_reset_fn_t reset,
* if classification fails, and any error code from reset
* methods.
*/
int ata_drive_probe_reset(struct ata_port *ap,
int ata_drive_probe_reset(struct ata_port *ap, ata_probeinit_fn_t probeinit,
ata_reset_fn_t softreset, ata_reset_fn_t hardreset,
ata_postreset_fn_t postreset, unsigned int *classes)
{
int rc = -EINVAL;

if (probeinit)
probeinit(ap);

if (softreset) {
rc = do_probe_reset(ap, softreset, postreset, classes);
if (rc == 0)
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ struct ata_queued_cmd;

/* typedefs */
typedef void (*ata_qc_cb_t) (struct ata_queued_cmd *qc);
typedef void (*ata_probeinit_fn_t)(struct ata_port *);
typedef int (*ata_reset_fn_t)(struct ata_port *, int, unsigned int *);
typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *);

Expand Down Expand Up @@ -484,6 +485,7 @@ extern void __sata_phy_reset(struct ata_port *ap);
extern void sata_phy_reset(struct ata_port *ap);
extern void ata_bus_reset(struct ata_port *ap);
extern int ata_drive_probe_reset(struct ata_port *ap,
ata_probeinit_fn_t probeinit,
ata_reset_fn_t softreset, ata_reset_fn_t hardreset,
ata_postreset_fn_t postreset, unsigned int *classes);
extern int ata_std_softreset(struct ata_port *ap, int verbose,
Expand Down

0 comments on commit b9c5e99

Please sign in to comment.