You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[PATCH] libata: rename ATA_FLAG_PORT_DISABLED to ATA_FLAG_DISABLED
Rename ATA_FLAG_PORT_DISABLED to ATA_FLAG_DISABLED for consistency. (ATA_FLAG_* are always about ports). Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
@@ -1045,7 +1045,7 @@ ata_exec_internal(struct ata_port *ap, struct ata_device *dev,
|
|||||||
*
|
*
|
||||||
* Kill the following code as soon as those drivers are fixed.
|
* Kill the following code as soon as those drivers are fixed.
|
||||||
*/
|
*/
|
||||||
if (ap->flags & ATA_FLAG_PORT_DISABLED) {
|
if (ap->flags & ATA_FLAG_DISABLED) {
|
||||||
err_mask |= AC_ERR_SYSTEM;
|
err_mask |= AC_ERR_SYSTEM;
|
||||||
ata_port_probe(ap);
|
ata_port_probe(ap);
|
||||||
}
|
}
|
||||||
@@ -1395,7 +1395,7 @@ static int ata_bus_probe(struct ata_port *ap)
|
|||||||
} else {
|
} else {
|
||||||
ap->ops->phy_reset(ap);
|
ap->ops->phy_reset(ap);
|
||||||
|
|
||||||
if (!(ap->flags & ATA_FLAG_PORT_DISABLED))
|
if (!(ap->flags & ATA_FLAG_DISABLED))
|
||||||
for (i = 0; i < ATA_MAX_DEVICES; i++)
|
for (i = 0; i < ATA_MAX_DEVICES; i++)
|
||||||
classes[i] = ap->device[i].class;
|
classes[i] = ap->device[i].class;
|
||||||
|
|
||||||
@@ -1491,7 +1491,7 @@ static int ata_bus_probe(struct ata_port *ap)
|
|||||||
|
|
||||||
void ata_port_probe(struct ata_port *ap)
|
void ata_port_probe(struct ata_port *ap)
|
||||||
{
|
{
|
||||||
ap->flags &= ~ATA_FLAG_PORT_DISABLED;
|
ap->flags &= ~ATA_FLAG_DISABLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1565,7 +1565,7 @@ void __sata_phy_reset(struct ata_port *ap)
|
|||||||
else
|
else
|
||||||
ata_port_disable(ap);
|
ata_port_disable(ap);
|
||||||
|
|
||||||
if (ap->flags & ATA_FLAG_PORT_DISABLED)
|
if (ap->flags & ATA_FLAG_DISABLED)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT)) {
|
if (ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT)) {
|
||||||
@@ -1590,7 +1590,7 @@ void __sata_phy_reset(struct ata_port *ap)
|
|||||||
void sata_phy_reset(struct ata_port *ap)
|
void sata_phy_reset(struct ata_port *ap)
|
||||||
{
|
{
|
||||||
__sata_phy_reset(ap);
|
__sata_phy_reset(ap);
|
||||||
if (ap->flags & ATA_FLAG_PORT_DISABLED)
|
if (ap->flags & ATA_FLAG_DISABLED)
|
||||||
return;
|
return;
|
||||||
ata_bus_reset(ap);
|
ata_bus_reset(ap);
|
||||||
}
|
}
|
||||||
@@ -1629,7 +1629,7 @@ void ata_port_disable(struct ata_port *ap)
|
|||||||
{
|
{
|
||||||
ap->device[0].class = ATA_DEV_NONE;
|
ap->device[0].class = ATA_DEV_NONE;
|
||||||
ap->device[1].class = ATA_DEV_NONE;
|
ap->device[1].class = ATA_DEV_NONE;
|
||||||
ap->flags |= ATA_FLAG_PORT_DISABLED;
|
ap->flags |= ATA_FLAG_DISABLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2251,7 +2251,7 @@ static unsigned int ata_bus_softreset(struct ata_port *ap,
|
|||||||
* Obtains host_set lock.
|
* Obtains host_set lock.
|
||||||
*
|
*
|
||||||
* SIDE EFFECTS:
|
* SIDE EFFECTS:
|
||||||
* Sets ATA_FLAG_PORT_DISABLED if bus reset fails.
|
* Sets ATA_FLAG_DISABLED if bus reset fails.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void ata_bus_reset(struct ata_port *ap)
|
void ata_bus_reset(struct ata_port *ap)
|
||||||
@@ -4468,7 +4468,7 @@ irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs)
|
|||||||
|
|
||||||
ap = host_set->ports[i];
|
ap = host_set->ports[i];
|
||||||
if (ap &&
|
if (ap &&
|
||||||
!(ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR))) {
|
!(ap->flags & (ATA_FLAG_DISABLED | ATA_FLAG_NOINTR))) {
|
||||||
struct ata_queued_cmd *qc;
|
struct ata_queued_cmd *qc;
|
||||||
|
|
||||||
qc = ata_qc_from_tag(ap, ap->active_tag);
|
qc = ata_qc_from_tag(ap, ap->active_tag);
|
||||||
@@ -4689,7 +4689,7 @@ static void ata_host_init(struct ata_port *ap, struct Scsi_Host *host,
|
|||||||
host->unique_id = ata_unique_id++;
|
host->unique_id = ata_unique_id++;
|
||||||
host->max_cmd_len = 12;
|
host->max_cmd_len = 12;
|
||||||
|
|
||||||
ap->flags = ATA_FLAG_PORT_DISABLED;
|
ap->flags = ATA_FLAG_DISABLED;
|
||||||
ap->id = host->unique_id;
|
ap->id = host->unique_id;
|
||||||
ap->host = host;
|
ap->host = host;
|
||||||
ap->ctl = ATA_DEVCTL_OBS;
|
ap->ctl = ATA_DEVCTL_OBS;
|
||||||
|
|||||||
@@ -2728,7 +2728,7 @@ void ata_scsi_scan_host(struct ata_port *ap)
|
|||||||
struct ata_device *dev;
|
struct ata_device *dev;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
if (ap->flags & ATA_FLAG_PORT_DISABLED)
|
if (ap->flags & ATA_FLAG_DISABLED)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (i = 0; i < ATA_MAX_DEVICES; i++) {
|
for (i = 0; i < ATA_MAX_DEVICES; i++) {
|
||||||
|
|||||||
@@ -456,7 +456,7 @@ static inline unsigned int adma_intr_pkt(struct ata_host_set *host_set)
|
|||||||
continue;
|
continue;
|
||||||
handled = 1;
|
handled = 1;
|
||||||
adma_enter_reg_mode(ap);
|
adma_enter_reg_mode(ap);
|
||||||
if (ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR))
|
if (ap->flags & (ATA_FLAG_DISABLED | ATA_FLAG_NOINTR))
|
||||||
continue;
|
continue;
|
||||||
pp = ap->private_data;
|
pp = ap->private_data;
|
||||||
if (!pp || pp->state != adma_state_pkt)
|
if (!pp || pp->state != adma_state_pkt)
|
||||||
@@ -481,7 +481,7 @@ static inline unsigned int adma_intr_mmio(struct ata_host_set *host_set)
|
|||||||
for (port_no = 0; port_no < host_set->n_ports; ++port_no) {
|
for (port_no = 0; port_no < host_set->n_ports; ++port_no) {
|
||||||
struct ata_port *ap;
|
struct ata_port *ap;
|
||||||
ap = host_set->ports[port_no];
|
ap = host_set->ports[port_no];
|
||||||
if (ap && (!(ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR)))) {
|
if (ap && (!(ap->flags & (ATA_FLAG_DISABLED | ATA_FLAG_NOINTR)))) {
|
||||||
struct ata_queued_cmd *qc;
|
struct ata_queued_cmd *qc;
|
||||||
struct adma_port_priv *pp = ap->private_data;
|
struct adma_port_priv *pp = ap->private_data;
|
||||||
if (!pp || pp->state != adma_state_mmio)
|
if (!pp || pp->state != adma_state_mmio)
|
||||||
|
|||||||
@@ -1397,7 +1397,7 @@ static void mv_host_intr(struct ata_host_set *host_set, u32 relevant,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR))
|
if (ap->flags & (ATA_FLAG_DISABLED | ATA_FLAG_NOINTR))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
err_mask = ac_err_mask(ata_status);
|
err_mask = ac_err_mask(ata_status);
|
||||||
|
|||||||
@@ -280,7 +280,7 @@ static irqreturn_t nv_interrupt (int irq, void *dev_instance,
|
|||||||
|
|
||||||
ap = host_set->ports[i];
|
ap = host_set->ports[i];
|
||||||
if (ap &&
|
if (ap &&
|
||||||
!(ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR))) {
|
!(ap->flags & (ATA_FLAG_DISABLED | ATA_FLAG_NOINTR))) {
|
||||||
struct ata_queued_cmd *qc;
|
struct ata_queued_cmd *qc;
|
||||||
|
|
||||||
qc = ata_qc_from_tag(ap, ap->active_tag);
|
qc = ata_qc_from_tag(ap, ap->active_tag);
|
||||||
|
|||||||
@@ -534,7 +534,7 @@ static irqreturn_t pdc_interrupt (int irq, void *dev_instance, struct pt_regs *r
|
|||||||
ap = host_set->ports[i];
|
ap = host_set->ports[i];
|
||||||
tmp = mask & (1 << (i + 1));
|
tmp = mask & (1 << (i + 1));
|
||||||
if (tmp && ap &&
|
if (tmp && ap &&
|
||||||
!(ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR))) {
|
!(ap->flags & (ATA_FLAG_DISABLED | ATA_FLAG_NOINTR))) {
|
||||||
struct ata_queued_cmd *qc;
|
struct ata_queued_cmd *qc;
|
||||||
|
|
||||||
qc = ata_qc_from_tag(ap, ap->active_tag);
|
qc = ata_qc_from_tag(ap, ap->active_tag);
|
||||||
|
|||||||
@@ -396,7 +396,7 @@ static inline unsigned int qs_intr_pkt(struct ata_host_set *host_set)
|
|||||||
sff1, sff0, port_no, sHST, sDST);
|
sff1, sff0, port_no, sHST, sDST);
|
||||||
handled = 1;
|
handled = 1;
|
||||||
if (ap && !(ap->flags &
|
if (ap && !(ap->flags &
|
||||||
(ATA_FLAG_PORT_DISABLED|ATA_FLAG_NOINTR))) {
|
(ATA_FLAG_DISABLED|ATA_FLAG_NOINTR))) {
|
||||||
struct ata_queued_cmd *qc;
|
struct ata_queued_cmd *qc;
|
||||||
struct qs_port_priv *pp = ap->private_data;
|
struct qs_port_priv *pp = ap->private_data;
|
||||||
if (!pp || pp->state != qs_state_pkt)
|
if (!pp || pp->state != qs_state_pkt)
|
||||||
@@ -429,7 +429,7 @@ static inline unsigned int qs_intr_mmio(struct ata_host_set *host_set)
|
|||||||
struct ata_port *ap;
|
struct ata_port *ap;
|
||||||
ap = host_set->ports[port_no];
|
ap = host_set->ports[port_no];
|
||||||
if (ap &&
|
if (ap &&
|
||||||
!(ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR))) {
|
!(ap->flags & (ATA_FLAG_DISABLED | ATA_FLAG_NOINTR))) {
|
||||||
struct ata_queued_cmd *qc;
|
struct ata_queued_cmd *qc;
|
||||||
struct qs_port_priv *pp = ap->private_data;
|
struct qs_port_priv *pp = ap->private_data;
|
||||||
if (!pp || pp->state != qs_state_mmio)
|
if (!pp || pp->state != qs_state_mmio)
|
||||||
|
|||||||
@@ -770,7 +770,7 @@ static irqreturn_t sil24_interrupt(int irq, void *dev_instance, struct pt_regs *
|
|||||||
for (i = 0; i < host_set->n_ports; i++)
|
for (i = 0; i < host_set->n_ports; i++)
|
||||||
if (status & (1 << i)) {
|
if (status & (1 << i)) {
|
||||||
struct ata_port *ap = host_set->ports[i];
|
struct ata_port *ap = host_set->ports[i];
|
||||||
if (ap && !(ap->flags & ATA_FLAG_PORT_DISABLED)) {
|
if (ap && !(ap->flags & ATA_FLAG_DISABLED)) {
|
||||||
sil24_host_intr(host_set->ports[i]);
|
sil24_host_intr(host_set->ports[i]);
|
||||||
handled++;
|
handled++;
|
||||||
} else
|
} else
|
||||||
|
|||||||
@@ -834,7 +834,7 @@ static irqreturn_t pdc20621_interrupt (int irq, void *dev_instance, struct pt_re
|
|||||||
tmp = mask & (1 << i);
|
tmp = mask & (1 << i);
|
||||||
VPRINTK("seq %u, port_no %u, ap %p, tmp %x\n", i, port_no, ap, tmp);
|
VPRINTK("seq %u, port_no %u, ap %p, tmp %x\n", i, port_no, ap, tmp);
|
||||||
if (tmp && ap &&
|
if (tmp && ap &&
|
||||||
!(ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR))) {
|
!(ap->flags & (ATA_FLAG_DISABLED | ATA_FLAG_NOINTR))) {
|
||||||
struct ata_queued_cmd *qc;
|
struct ata_queued_cmd *qc;
|
||||||
|
|
||||||
qc = ata_qc_from_tag(ap, ap->active_tag);
|
qc = ata_qc_from_tag(ap, ap->active_tag);
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ static irqreturn_t vsc_sata_interrupt (int irq, void *dev_instance,
|
|||||||
ap = host_set->ports[i];
|
ap = host_set->ports[i];
|
||||||
|
|
||||||
if (ap && !(ap->flags &
|
if (ap && !(ap->flags &
|
||||||
(ATA_FLAG_PORT_DISABLED|ATA_FLAG_NOINTR))) {
|
(ATA_FLAG_DISABLED|ATA_FLAG_NOINTR))) {
|
||||||
struct ata_queued_cmd *qc;
|
struct ata_queued_cmd *qc;
|
||||||
|
|
||||||
qc = ata_qc_from_tag(ap, ap->active_tag);
|
qc = ata_qc_from_tag(ap, ap->active_tag);
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ enum {
|
|||||||
ATA_FLAG_DEBUGMSG = (1 << 17),
|
ATA_FLAG_DEBUGMSG = (1 << 17),
|
||||||
ATA_FLAG_FLUSH_PORT_TASK = (1 << 18), /* flush port task */
|
ATA_FLAG_FLUSH_PORT_TASK = (1 << 18), /* flush port task */
|
||||||
|
|
||||||
ATA_FLAG_PORT_DISABLED = (1 << 19), /* port is disabled, ignore it */
|
ATA_FLAG_DISABLED = (1 << 19), /* port is disabled, ignore it */
|
||||||
ATA_FLAG_SUSPENDED = (1 << 20), /* port is suspended */
|
ATA_FLAG_SUSPENDED = (1 << 20), /* port is suspended */
|
||||||
|
|
||||||
/* bits 24:31 of ap->flags are reserved for LLDD specific flags */
|
/* bits 24:31 of ap->flags are reserved for LLDD specific flags */
|
||||||
|
|||||||
Reference in New Issue
Block a user