Re: [PATCH v1.3 11/11] arcmsr: Adding support Areca ARC1214/1224/1264/1284 SATA 6Gb raid controllers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



黃清隆 <ching2048@xxxxxxxxxxxx> :
[...]
> 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-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux