黃清隆 <ching2...@areca.com.tw> :
[...]
> diff -uprN a/drivers/scsi/arcmsr/arcmsr_hba.c 
> b/drivers/scsi/arcmsr/arcmsr_hba.c
> --- a/drivers/scsi/arcmsr/arcmsr_hba.c  2014-02-20 19:11:05.000000000 +0800
> +++ b/drivers/scsi/arcmsr/arcmsr_hba.c  2014-02-21 01:47:26.000000000 +0800
[...]
> @@ -2894,6 +3372,89 @@ polling_hbc_ccb_retry:
>  }
> 
>  static int
> +arcmsr_hbaD_polling_ccbdone(struct AdapterControlBlock *acb,
> +                               struct CommandControlBlock *poll_ccb)
> +{
> +       bool error;
> +       uint32_t poll_ccb_done = 0, poll_count = 0, flag_ccb, ccb_cdb_phy;
> +       int rtn, doneq_index, index_stripped, outbound_write_pointer;
> +       unsigned long flags;
> +       struct ARCMSR_CDB *arcmsr_cdb;
> +       struct CommandControlBlock *pCCB;
> +       struct MessageUnit_D *pmu = acb->pmuD;
> +
> +       spin_lock_irqsave(&acb->doneq_lock, flags);
> +polling_hbaD_ccb_retry:
> +       poll_count++;
> +       while (1) {
> +               outbound_write_pointer = pmu->done_qbuffer[0].addressLow + 1;
> +               doneq_index = pmu->doneq_index;
> +               if ((outbound_write_pointer & 0xFFF) == (doneq_index & 
> 0xFFF)) {
> +                       if (poll_ccb_done) {
> +                               rtn = SUCCESS;
> +                               break;
> +                       } else {
> +                               msleep(25);

msleep with spinlock held.

-- 
Ueimor
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to