Skip to content

Commit

Permalink
[PATCH] libata: separate out __ata_ehi_hotplugged()
Browse files Browse the repository at this point in the history
Separate out __ata_ehi_hotplugged() from ata_ehi_hotplugged().  The
underscored version doesn't set AC_ERR_ATA_BUS.  This will be used for
resume which is a hotplug event but not an ATA bus error.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Jul 6, 2006
1 parent 1cdaf53 commit c0b6c03
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions include/linux/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -843,19 +843,24 @@ extern void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset,
(ehi)->desc_len = 0; \
} while (0)

static inline void ata_ehi_hotplugged(struct ata_eh_info *ehi)
static inline void __ata_ehi_hotplugged(struct ata_eh_info *ehi)
{
if (ehi->flags & ATA_EHI_HOTPLUGGED)
return;

ehi->flags |= ATA_EHI_HOTPLUGGED | ATA_EHI_RESUME_LINK;
ehi->hotplug_timestamp = jiffies;

ehi->err_mask |= AC_ERR_ATA_BUS;
ehi->action |= ATA_EH_SOFTRESET;
ehi->probe_mask |= (1 << ATA_MAX_DEVICES) - 1;
}

static inline void ata_ehi_hotplugged(struct ata_eh_info *ehi)
{
__ata_ehi_hotplugged(ehi);
ehi->err_mask |= AC_ERR_ATA_BUS;
}

/*
* qc helpers
*/
Expand Down

0 comments on commit c0b6c03

Please sign in to comment.