Re: [RFC PATCH] mmc: support background operation

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

 



Hi Seungwon.

Seungwon Jeon wrote:
> Hi Jaehoon Chung,
> 
>> @@ -762,6 +773,23 @@ static int mmc_init_card(struct mmc_host *host, u32
>> ocr,
>>  	}
>>
>>  	/*
>> +	 * Enable HPI feature (if supported)
>> +	 */
>> +	if (card->ext_csd.hpi) {
>> +		err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
>> +			EXT_CSD_HPI_MGMT, 1, 0);
>> +		if (err && err != -EBADMSG)
>> +			goto free_card;
>> +
>> +		if (err) {
>> +			printk(KERN_WARNING "%s: Enabling HPI failed\n",
>> +				mmc_hostname(card->host));
>> +			err = 0;
>> +		} else
>> +			card->ext_csd.hpi_en = 1;
>> +	}
>> +
> There is no code for enabling BKOPS_EN?
> If host want to handle background operation manually, it needs. 

Sorry, this code is my mistake...maybe duplicated the HPI patch..
You means maybe need this code..
           /*
+           * Enable BKOPS feature (if supported)
+           */
+           if (card->ext_csd.bkops != NULL) {
+                         /*
+                         * If card supported BKOPS, default set BKOPS_EN bit.
+                         * But ensure to enable bkops, need to check enable bit
+                         */
+                         if (!card->ext_csd.bkops_en) {
+                                      err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
+                                                   EXT_CSD_BKOPS_EN, 1, 0);
+                                      if (err && err != -EBADMSG)
+                                                   goto free_card;
+
+                                      if (err) {
+                                                   printk(KERN_ERR "%s: Enabling BKOPS failed\n",
+                                                                mmc_hostname(card->host));
+                                                   err = 0;
+                                      } else
+                                                   card->ext_csd.bkops_en = 1;
+                         }
+           }
+

I will resend the RFC patch..

Thank you for comment.

Best Regards,
Jaehoon Chung
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux