Merge branch 'tmp'
This commit is contained in:
commit
b4d28889f7
@ -184,7 +184,7 @@ struct ahci_port_priv {
|
|||||||
static u32 ahci_scr_read (struct ata_port *ap, unsigned int sc_reg);
|
static u32 ahci_scr_read (struct ata_port *ap, unsigned int sc_reg);
|
||||||
static void ahci_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val);
|
static void ahci_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val);
|
||||||
static int ahci_init_one (struct pci_dev *pdev, const struct pci_device_id *ent);
|
static int ahci_init_one (struct pci_dev *pdev, const struct pci_device_id *ent);
|
||||||
static int ahci_qc_issue(struct ata_queued_cmd *qc);
|
static unsigned int ahci_qc_issue(struct ata_queued_cmd *qc);
|
||||||
static irqreturn_t ahci_interrupt (int irq, void *dev_instance, struct pt_regs *regs);
|
static irqreturn_t ahci_interrupt (int irq, void *dev_instance, struct pt_regs *regs);
|
||||||
static void ahci_phy_reset(struct ata_port *ap);
|
static void ahci_phy_reset(struct ata_port *ap);
|
||||||
static void ahci_irq_clear(struct ata_port *ap);
|
static void ahci_irq_clear(struct ata_port *ap);
|
||||||
@ -800,7 +800,7 @@ static irqreturn_t ahci_interrupt (int irq, void *dev_instance, struct pt_regs *
|
|||||||
return IRQ_RETVAL(handled);
|
return IRQ_RETVAL(handled);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ahci_qc_issue(struct ata_queued_cmd *qc)
|
static unsigned int ahci_qc_issue(struct ata_queued_cmd *qc)
|
||||||
{
|
{
|
||||||
struct ata_port *ap = qc->ap;
|
struct ata_port *ap = qc->ap;
|
||||||
void __iomem *port_mmio = (void __iomem *) ap->ioaddr.cmd_addr;
|
void __iomem *port_mmio = (void __iomem *) ap->ioaddr.cmd_addr;
|
||||||
|
@ -1126,10 +1126,9 @@ ata_exec_internal(struct ata_port *ap, struct ata_device *dev,
|
|||||||
qc->private_data = &wait;
|
qc->private_data = &wait;
|
||||||
qc->complete_fn = ata_qc_complete_internal;
|
qc->complete_fn = ata_qc_complete_internal;
|
||||||
|
|
||||||
if (ata_qc_issue(qc)) {
|
qc->err_mask = ata_qc_issue(qc);
|
||||||
qc->err_mask = AC_ERR_OTHER;
|
if (qc->err_mask)
|
||||||
ata_qc_complete(qc);
|
ata_qc_complete(qc);
|
||||||
}
|
|
||||||
|
|
||||||
spin_unlock_irqrestore(&ap->host_set->lock, flags);
|
spin_unlock_irqrestore(&ap->host_set->lock, flags);
|
||||||
|
|
||||||
@ -3860,10 +3859,10 @@ static inline int ata_should_dma_map(struct ata_queued_cmd *qc)
|
|||||||
* spin_lock_irqsave(host_set lock)
|
* spin_lock_irqsave(host_set lock)
|
||||||
*
|
*
|
||||||
* RETURNS:
|
* RETURNS:
|
||||||
* Zero on success, negative on error.
|
* Zero on success, AC_ERR_* mask on failure
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int ata_qc_issue(struct ata_queued_cmd *qc)
|
unsigned int ata_qc_issue(struct ata_queued_cmd *qc)
|
||||||
{
|
{
|
||||||
struct ata_port *ap = qc->ap;
|
struct ata_port *ap = qc->ap;
|
||||||
|
|
||||||
@ -3888,7 +3887,7 @@ int ata_qc_issue(struct ata_queued_cmd *qc)
|
|||||||
|
|
||||||
sg_err:
|
sg_err:
|
||||||
qc->flags &= ~ATA_QCFLAG_DMAMAP;
|
qc->flags &= ~ATA_QCFLAG_DMAMAP;
|
||||||
return -1;
|
return AC_ERR_SYSTEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -3907,10 +3906,10 @@ sg_err:
|
|||||||
* spin_lock_irqsave(host_set lock)
|
* spin_lock_irqsave(host_set lock)
|
||||||
*
|
*
|
||||||
* RETURNS:
|
* RETURNS:
|
||||||
* Zero on success, negative on error.
|
* Zero on success, AC_ERR_* mask on failure
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int ata_qc_issue_prot(struct ata_queued_cmd *qc)
|
unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc)
|
||||||
{
|
{
|
||||||
struct ata_port *ap = qc->ap;
|
struct ata_port *ap = qc->ap;
|
||||||
|
|
||||||
@ -4015,7 +4014,7 @@ int ata_qc_issue_prot(struct ata_queued_cmd *qc)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
WARN_ON(1);
|
WARN_ON(1);
|
||||||
return -1;
|
return AC_ERR_SYSTEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1322,10 +1322,9 @@ static void ata_scsi_translate(struct ata_port *ap, struct ata_device *dev,
|
|||||||
goto early_finish;
|
goto early_finish;
|
||||||
|
|
||||||
/* select device, send command to hardware */
|
/* select device, send command to hardware */
|
||||||
if (ata_qc_issue(qc)) {
|
qc->err_mask = ata_qc_issue(qc);
|
||||||
qc->err_mask |= AC_ERR_OTHER;
|
if (qc->err_mask)
|
||||||
ata_qc_complete(qc);
|
ata_qc_complete(qc);
|
||||||
}
|
|
||||||
|
|
||||||
VPRINTK("EXIT\n");
|
VPRINTK("EXIT\n");
|
||||||
return;
|
return;
|
||||||
@ -2044,10 +2043,9 @@ static void atapi_request_sense(struct ata_queued_cmd *qc)
|
|||||||
|
|
||||||
qc->complete_fn = atapi_sense_complete;
|
qc->complete_fn = atapi_sense_complete;
|
||||||
|
|
||||||
if (ata_qc_issue(qc)) {
|
qc->err_mask = ata_qc_issue(qc);
|
||||||
qc->err_mask |= AC_ERR_OTHER;
|
if (qc->err_mask)
|
||||||
ata_qc_complete(qc);
|
ata_qc_complete(qc);
|
||||||
}
|
|
||||||
|
|
||||||
DPRINTK("EXIT\n");
|
DPRINTK("EXIT\n");
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ extern struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap,
|
|||||||
struct ata_device *dev);
|
struct ata_device *dev);
|
||||||
extern int ata_rwcmd_protocol(struct ata_queued_cmd *qc);
|
extern int ata_rwcmd_protocol(struct ata_queued_cmd *qc);
|
||||||
extern void ata_qc_free(struct ata_queued_cmd *qc);
|
extern void ata_qc_free(struct ata_queued_cmd *qc);
|
||||||
extern int ata_qc_issue(struct ata_queued_cmd *qc);
|
extern unsigned int ata_qc_issue(struct ata_queued_cmd *qc);
|
||||||
extern int ata_check_atapi_dma(struct ata_queued_cmd *qc);
|
extern int ata_check_atapi_dma(struct ata_queued_cmd *qc);
|
||||||
extern void ata_dev_select(struct ata_port *ap, unsigned int device,
|
extern void ata_dev_select(struct ata_port *ap, unsigned int device,
|
||||||
unsigned int wait, unsigned int can_sleep);
|
unsigned int wait, unsigned int can_sleep);
|
||||||
|
@ -131,7 +131,7 @@ static void adma_host_stop(struct ata_host_set *host_set);
|
|||||||
static void adma_port_stop(struct ata_port *ap);
|
static void adma_port_stop(struct ata_port *ap);
|
||||||
static void adma_phy_reset(struct ata_port *ap);
|
static void adma_phy_reset(struct ata_port *ap);
|
||||||
static void adma_qc_prep(struct ata_queued_cmd *qc);
|
static void adma_qc_prep(struct ata_queued_cmd *qc);
|
||||||
static int adma_qc_issue(struct ata_queued_cmd *qc);
|
static unsigned int adma_qc_issue(struct ata_queued_cmd *qc);
|
||||||
static int adma_check_atapi_dma(struct ata_queued_cmd *qc);
|
static int adma_check_atapi_dma(struct ata_queued_cmd *qc);
|
||||||
static void adma_bmdma_stop(struct ata_queued_cmd *qc);
|
static void adma_bmdma_stop(struct ata_queued_cmd *qc);
|
||||||
static u8 adma_bmdma_status(struct ata_port *ap);
|
static u8 adma_bmdma_status(struct ata_port *ap);
|
||||||
@ -419,7 +419,7 @@ static inline void adma_packet_start(struct ata_queued_cmd *qc)
|
|||||||
writew(aPIOMD4 | aGO, chan + ADMA_CONTROL);
|
writew(aPIOMD4 | aGO, chan + ADMA_CONTROL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int adma_qc_issue(struct ata_queued_cmd *qc)
|
static unsigned int adma_qc_issue(struct ata_queued_cmd *qc)
|
||||||
{
|
{
|
||||||
struct adma_port_priv *pp = qc->ap->private_data;
|
struct adma_port_priv *pp = qc->ap->private_data;
|
||||||
|
|
||||||
|
@ -328,7 +328,7 @@ static void mv_host_stop(struct ata_host_set *host_set);
|
|||||||
static int mv_port_start(struct ata_port *ap);
|
static int mv_port_start(struct ata_port *ap);
|
||||||
static void mv_port_stop(struct ata_port *ap);
|
static void mv_port_stop(struct ata_port *ap);
|
||||||
static void mv_qc_prep(struct ata_queued_cmd *qc);
|
static void mv_qc_prep(struct ata_queued_cmd *qc);
|
||||||
static int mv_qc_issue(struct ata_queued_cmd *qc);
|
static unsigned int mv_qc_issue(struct ata_queued_cmd *qc);
|
||||||
static irqreturn_t mv_interrupt(int irq, void *dev_instance,
|
static irqreturn_t mv_interrupt(int irq, void *dev_instance,
|
||||||
struct pt_regs *regs);
|
struct pt_regs *regs);
|
||||||
static void mv_eng_timeout(struct ata_port *ap);
|
static void mv_eng_timeout(struct ata_port *ap);
|
||||||
@ -1040,7 +1040,7 @@ static void mv_qc_prep(struct ata_queued_cmd *qc)
|
|||||||
* LOCKING:
|
* LOCKING:
|
||||||
* Inherited from caller.
|
* Inherited from caller.
|
||||||
*/
|
*/
|
||||||
static int mv_qc_issue(struct ata_queued_cmd *qc)
|
static unsigned int mv_qc_issue(struct ata_queued_cmd *qc)
|
||||||
{
|
{
|
||||||
void __iomem *port_mmio = mv_ap_base(qc->ap);
|
void __iomem *port_mmio = mv_ap_base(qc->ap);
|
||||||
struct mv_port_priv *pp = qc->ap->private_data;
|
struct mv_port_priv *pp = qc->ap->private_data;
|
||||||
|
@ -96,7 +96,7 @@ static void pdc_qc_prep(struct ata_queued_cmd *qc);
|
|||||||
static void pdc_tf_load_mmio(struct ata_port *ap, const struct ata_taskfile *tf);
|
static void pdc_tf_load_mmio(struct ata_port *ap, const struct ata_taskfile *tf);
|
||||||
static void pdc_exec_command_mmio(struct ata_port *ap, const struct ata_taskfile *tf);
|
static void pdc_exec_command_mmio(struct ata_port *ap, const struct ata_taskfile *tf);
|
||||||
static void pdc_irq_clear(struct ata_port *ap);
|
static void pdc_irq_clear(struct ata_port *ap);
|
||||||
static int pdc_qc_issue_prot(struct ata_queued_cmd *qc);
|
static unsigned int pdc_qc_issue_prot(struct ata_queued_cmd *qc);
|
||||||
|
|
||||||
|
|
||||||
static struct scsi_host_template pdc_ata_sht = {
|
static struct scsi_host_template pdc_ata_sht = {
|
||||||
@ -545,7 +545,7 @@ static inline void pdc_packet_start(struct ata_queued_cmd *qc)
|
|||||||
readl((void __iomem *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); /* flush */
|
readl((void __iomem *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); /* flush */
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pdc_qc_issue_prot(struct ata_queued_cmd *qc)
|
static unsigned int pdc_qc_issue_prot(struct ata_queued_cmd *qc)
|
||||||
{
|
{
|
||||||
switch (qc->tf.protocol) {
|
switch (qc->tf.protocol) {
|
||||||
case ATA_PROT_DMA:
|
case ATA_PROT_DMA:
|
||||||
|
@ -120,7 +120,7 @@ static void qs_host_stop(struct ata_host_set *host_set);
|
|||||||
static void qs_port_stop(struct ata_port *ap);
|
static void qs_port_stop(struct ata_port *ap);
|
||||||
static void qs_phy_reset(struct ata_port *ap);
|
static void qs_phy_reset(struct ata_port *ap);
|
||||||
static void qs_qc_prep(struct ata_queued_cmd *qc);
|
static void qs_qc_prep(struct ata_queued_cmd *qc);
|
||||||
static int qs_qc_issue(struct ata_queued_cmd *qc);
|
static unsigned int qs_qc_issue(struct ata_queued_cmd *qc);
|
||||||
static int qs_check_atapi_dma(struct ata_queued_cmd *qc);
|
static int qs_check_atapi_dma(struct ata_queued_cmd *qc);
|
||||||
static void qs_bmdma_stop(struct ata_queued_cmd *qc);
|
static void qs_bmdma_stop(struct ata_queued_cmd *qc);
|
||||||
static u8 qs_bmdma_status(struct ata_port *ap);
|
static u8 qs_bmdma_status(struct ata_port *ap);
|
||||||
@ -352,7 +352,7 @@ static inline void qs_packet_start(struct ata_queued_cmd *qc)
|
|||||||
readl(chan + QS_CCT_CFF); /* flush */
|
readl(chan + QS_CCT_CFF); /* flush */
|
||||||
}
|
}
|
||||||
|
|
||||||
static int qs_qc_issue(struct ata_queued_cmd *qc)
|
static unsigned int qs_qc_issue(struct ata_queued_cmd *qc)
|
||||||
{
|
{
|
||||||
struct qs_port_priv *pp = qc->ap->private_data;
|
struct qs_port_priv *pp = qc->ap->private_data;
|
||||||
|
|
||||||
|
@ -251,7 +251,7 @@ static void sil24_scr_write(struct ata_port *ap, unsigned sc_reg, u32 val);
|
|||||||
static void sil24_tf_read(struct ata_port *ap, struct ata_taskfile *tf);
|
static void sil24_tf_read(struct ata_port *ap, struct ata_taskfile *tf);
|
||||||
static void sil24_phy_reset(struct ata_port *ap);
|
static void sil24_phy_reset(struct ata_port *ap);
|
||||||
static void sil24_qc_prep(struct ata_queued_cmd *qc);
|
static void sil24_qc_prep(struct ata_queued_cmd *qc);
|
||||||
static int sil24_qc_issue(struct ata_queued_cmd *qc);
|
static unsigned int sil24_qc_issue(struct ata_queued_cmd *qc);
|
||||||
static void sil24_irq_clear(struct ata_port *ap);
|
static void sil24_irq_clear(struct ata_port *ap);
|
||||||
static void sil24_eng_timeout(struct ata_port *ap);
|
static void sil24_eng_timeout(struct ata_port *ap);
|
||||||
static irqreturn_t sil24_interrupt(int irq, void *dev_instance, struct pt_regs *regs);
|
static irqreturn_t sil24_interrupt(int irq, void *dev_instance, struct pt_regs *regs);
|
||||||
@ -557,7 +557,7 @@ static void sil24_qc_prep(struct ata_queued_cmd *qc)
|
|||||||
sil24_fill_sg(qc, sge);
|
sil24_fill_sg(qc, sge);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sil24_qc_issue(struct ata_queued_cmd *qc)
|
static unsigned int sil24_qc_issue(struct ata_queued_cmd *qc)
|
||||||
{
|
{
|
||||||
struct ata_port *ap = qc->ap;
|
struct ata_port *ap = qc->ap;
|
||||||
void __iomem *port = (void __iomem *)ap->ioaddr.cmd_addr;
|
void __iomem *port = (void __iomem *)ap->ioaddr.cmd_addr;
|
||||||
|
@ -174,7 +174,7 @@ static void pdc20621_get_from_dimm(struct ata_probe_ent *pe,
|
|||||||
static void pdc20621_put_to_dimm(struct ata_probe_ent *pe,
|
static void pdc20621_put_to_dimm(struct ata_probe_ent *pe,
|
||||||
void *psource, u32 offset, u32 size);
|
void *psource, u32 offset, u32 size);
|
||||||
static void pdc20621_irq_clear(struct ata_port *ap);
|
static void pdc20621_irq_clear(struct ata_port *ap);
|
||||||
static int pdc20621_qc_issue_prot(struct ata_queued_cmd *qc);
|
static unsigned int pdc20621_qc_issue_prot(struct ata_queued_cmd *qc);
|
||||||
|
|
||||||
|
|
||||||
static struct scsi_host_template pdc_sata_sht = {
|
static struct scsi_host_template pdc_sata_sht = {
|
||||||
@ -678,7 +678,7 @@ static void pdc20621_packet_start(struct ata_queued_cmd *qc)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pdc20621_qc_issue_prot(struct ata_queued_cmd *qc)
|
static unsigned int pdc20621_qc_issue_prot(struct ata_queued_cmd *qc)
|
||||||
{
|
{
|
||||||
switch (qc->tf.protocol) {
|
switch (qc->tf.protocol) {
|
||||||
case ATA_PROT_DMA:
|
case ATA_PROT_DMA:
|
||||||
|
@ -584,8 +584,7 @@ static int scsi_request_sense(struct scsi_cmnd *scmd)
|
|||||||
* keep a list of pending commands for final completion, and once we
|
* keep a list of pending commands for final completion, and once we
|
||||||
* are ready to leave error handling we handle completion for real.
|
* are ready to leave error handling we handle completion for real.
|
||||||
**/
|
**/
|
||||||
static void scsi_eh_finish_cmd(struct scsi_cmnd *scmd,
|
void scsi_eh_finish_cmd(struct scsi_cmnd *scmd, struct list_head *done_q)
|
||||||
struct list_head *done_q)
|
|
||||||
{
|
{
|
||||||
scmd->device->host->host_failed--;
|
scmd->device->host->host_failed--;
|
||||||
scmd->eh_eflags = 0;
|
scmd->eh_eflags = 0;
|
||||||
@ -597,6 +596,7 @@ static void scsi_eh_finish_cmd(struct scsi_cmnd *scmd,
|
|||||||
scsi_setup_cmd_retry(scmd);
|
scsi_setup_cmd_retry(scmd);
|
||||||
list_move_tail(&scmd->eh_entry, done_q);
|
list_move_tail(&scmd->eh_entry, done_q);
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL(scsi_eh_finish_cmd);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* scsi_eh_get_sense - Get device sense data.
|
* scsi_eh_get_sense - Get device sense data.
|
||||||
@ -1425,7 +1425,7 @@ static void scsi_eh_ready_devs(struct Scsi_Host *shost,
|
|||||||
* @done_q: list_head of processed commands.
|
* @done_q: list_head of processed commands.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
static void scsi_eh_flush_done_q(struct list_head *done_q)
|
void scsi_eh_flush_done_q(struct list_head *done_q)
|
||||||
{
|
{
|
||||||
struct scsi_cmnd *scmd, *next;
|
struct scsi_cmnd *scmd, *next;
|
||||||
|
|
||||||
@ -1454,6 +1454,7 @@ static void scsi_eh_flush_done_q(struct list_head *done_q)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL(scsi_eh_flush_done_q);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* scsi_unjam_host - Attempt to fix a host which has a cmd that failed.
|
* scsi_unjam_host - Attempt to fix a host which has a cmd that failed.
|
||||||
|
@ -430,7 +430,7 @@ struct ata_port_operations {
|
|||||||
void (*bmdma_start) (struct ata_queued_cmd *qc);
|
void (*bmdma_start) (struct ata_queued_cmd *qc);
|
||||||
|
|
||||||
void (*qc_prep) (struct ata_queued_cmd *qc);
|
void (*qc_prep) (struct ata_queued_cmd *qc);
|
||||||
int (*qc_issue) (struct ata_queued_cmd *qc);
|
unsigned int (*qc_issue) (struct ata_queued_cmd *qc);
|
||||||
|
|
||||||
void (*eng_timeout) (struct ata_port *ap);
|
void (*eng_timeout) (struct ata_port *ap);
|
||||||
|
|
||||||
@ -518,7 +518,7 @@ extern void ata_port_stop (struct ata_port *ap);
|
|||||||
extern void ata_host_stop (struct ata_host_set *host_set);
|
extern void ata_host_stop (struct ata_host_set *host_set);
|
||||||
extern irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs);
|
extern irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs);
|
||||||
extern void ata_qc_prep(struct ata_queued_cmd *qc);
|
extern void ata_qc_prep(struct ata_queued_cmd *qc);
|
||||||
extern int ata_qc_issue_prot(struct ata_queued_cmd *qc);
|
extern unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc);
|
||||||
extern void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf,
|
extern void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf,
|
||||||
unsigned int buflen);
|
unsigned int buflen);
|
||||||
extern void ata_sg_init(struct ata_queued_cmd *qc, struct scatterlist *sg,
|
extern void ata_sg_init(struct ata_queued_cmd *qc, struct scatterlist *sg,
|
||||||
|
@ -35,6 +35,9 @@ static inline int scsi_sense_valid(struct scsi_sense_hdr *sshdr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
extern void scsi_eh_finish_cmd(struct scsi_cmnd *scmd,
|
||||||
|
struct list_head *done_q);
|
||||||
|
extern void scsi_eh_flush_done_q(struct list_head *done_q);
|
||||||
extern void scsi_report_bus_reset(struct Scsi_Host *, int);
|
extern void scsi_report_bus_reset(struct Scsi_Host *, int);
|
||||||
extern void scsi_report_device_reset(struct Scsi_Host *, int, int);
|
extern void scsi_report_device_reset(struct Scsi_Host *, int, int);
|
||||||
extern int scsi_block_when_processing_errors(struct scsi_device *);
|
extern int scsi_block_when_processing_errors(struct scsi_device *);
|
||||||
|
Loading…
Reference in New Issue
Block a user