Re: [PATCH v1.3 11/11] arcmsr: Adding support Areca ARC1214/1224/1264/1284 SATA 6Gb raid controllers
From: Francois Romieu
Date: Fri Feb 21 2014 - 17:11:26 EST
éæé <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-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/