Re: [PATCH v3] Snoop SET FEATURES - WRITE CACHE ENABLE/DISABLE command

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

 



zhao, forrest wrote:
> diff --git a/drivers/scsi/libata-eh.c b/drivers/scsi/libata-eh.c
> index 71b45ad..0622ad5 100644
> --- a/drivers/scsi/libata-eh.c
> +++ b/drivers/scsi/libata-eh.c
> @@ -1356,6 +1356,8 @@ static int ata_eh_revalidate(struct ata_
>  			if (rc)
>  				break;
>  
> +			/* schedule the scsi_rescan_device() here */
> +			queue_work(ata_scsi_wq, &(ap->scsi_rescan_task));

Can you remove parentheses around ap->scsi_rescan_task?

>  			ehc->i.action &= ~ATA_EH_REVALIDATE;
>  		}
>  	}
> diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
> index 9e5cb9f..4e86807 100644
> --- a/drivers/scsi/libata-scsi.c
> +++ b/drivers/scsi/libata-scsi.c
> @@ -1269,6 +1269,17 @@ static void ata_scsi_qc_complete(struct 
>  	u8 *cdb = cmd->cmnd;
>   	int need_sense = (qc->err_mask != 0);
>  
> +	/* We snoop the SET_FEATURES - Write Cache ON/OFF command, and
> +	 * schedule EH_REVALIDATE operation to update the IDENTIFY DEVICE
> +	 * cache
> +	 */
> +	if (!need_sense && (qc->tf.command == ATA_CMD_SET_FEATURES) &&
> +	    ((qc->tf.feature == SETFEATURES_WC_ON) ||
> +	     (qc->tf.feature == SETFEATURES_WC_OFF))) {
> +		qc->ap->eh_info.action = ATA_EH_REVALIDATE;

Please do eh_info.action |= ATA_EH_REVALIDATE.
                         ^^^

-- 
tejun
-
: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux