From ead70773608a5d97f81cb492f117d20b5e9f323e Mon Sep 17 00:00:00 2001 From: Alex Dubov Date: Wed, 19 Mar 2008 17:01:06 -0700 Subject: memstick: automatically retrieve "INT" value from command response MemoryStick storage cards, when in parallel mode, send several meaningful bits of their "INT" register as part of command response. This data is stored by host and can be used to spare invocation of "GET_INT" TPC on each data page transferred between host and card. Signed-off-by: Alex Dubov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/memstick/core/memstick.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'drivers/memstick/core/memstick.c') diff --git a/drivers/memstick/core/memstick.c b/drivers/memstick/core/memstick.c index de80dba..946e3d3 100644 --- a/drivers/memstick/core/memstick.c +++ b/drivers/memstick/core/memstick.c @@ -276,8 +276,6 @@ void memstick_init_req_sg(struct memstick_request *mrq, unsigned char tpc, mrq->need_card_int = 1; else mrq->need_card_int = 0; - - mrq->get_int_reg = 0; } EXPORT_SYMBOL(memstick_init_req_sg); @@ -311,8 +309,6 @@ void memstick_init_req(struct memstick_request *mrq, unsigned char tpc, mrq->need_card_int = 1; else mrq->need_card_int = 0; - - mrq->get_int_reg = 0; } EXPORT_SYMBOL(memstick_init_req); @@ -342,6 +338,7 @@ static int h_memstick_read_dev_id(struct memstick_dev *card, card->id.class = id_reg.class; } complete(&card->mrq_complete); + dev_dbg(&card->dev, "if_mode = %02x\n", id_reg.if_mode); return -EAGAIN; } } @@ -422,7 +419,6 @@ static void memstick_power_on(struct memstick_host *host) { host->set_param(host, MEMSTICK_POWER, MEMSTICK_POWER_ON); host->set_param(host, MEMSTICK_INTERFACE, MEMSTICK_SERIAL); - msleep(1); } static void memstick_check(struct work_struct *work) @@ -579,7 +575,8 @@ EXPORT_SYMBOL(memstick_suspend_host); void memstick_resume_host(struct memstick_host *host) { mutex_lock(&host->lock); - host->set_param(host, MEMSTICK_POWER, MEMSTICK_POWER_ON); + if (host->card) + memstick_power_on(host); mutex_unlock(&host->lock); memstick_detect_change(host); } -- cgit v1.1